lasio icon indicating copy to clipboard operation
lasio copied to clipboard

It doesn't work. :(

Open geomarcneil opened this issue 4 months ago • 0 comments

Hello I'm new here tho I learn easily.

I got an error when I tried to open an API Las file

I've change the urllib2 with urllib.request in your code. urllib2 was a module in Python 2.x, but it's been replaced in Python 3.x. Then I got no error since then. But I got another error:

"HTTPError: HTTP Error 404: Not Found"

My code has this lines: import lasio.examples las = lasio.examples.open('C:\\Users\McNeil\\Desktop\\Texas Wellborne\\4208900504.las')

But when I tried to execute it via the command line: C:\Users\McNeil\Desktop\Texas Wellborne>python lasio_open.py

I got this error: Traceback (most recent call last): File "lasio_open.py", line 2, in <module> las = lasio.examples.open('C:\\Users\McNeil\\Desktop\\Texas Wellborne\\42089 00504.las') File "C:\Python3.6\lib\site-packages\lasio\examples.py", line 48, in open return open_github_example(filename, **kwargs) File "C:\Python3.6\lib\site-packages\lasio\examples.py", line 72, in open_gith ub_example response = urllib.request.urlopen(url) File "C:\Python3.6\lib\urllib\request.py", line 223, in urlopen return opener.open(url, data, timeout) File "C:\Python3.6\lib\urllib\request.py", line 532, in open response = meth(req, response) File "C:\Python3.6\lib\urllib\request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "C:\Python3.6\lib\urllib\request.py", line 570, in error return self._call_chain(*args) File "C:\Python3.6\lib\urllib\request.py", line 504, in _call_chain result = func(*args) File "C:\Python3.6\lib\urllib\request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 400: Bad Request

Please help.

geomarcneil avatar Feb 25 '24 07:02 geomarcneil