Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launching vmnetx with no network connectivity generates vague error message #46

Open
dayoonc opened this issue Jul 10, 2013 · 4 comments

Comments

@dayoonc
Copy link
Contributor

dayoonc commented Jul 10, 2013

When launching a .netx file with no network connection, the application fails (as it should) but presents a vague error message: "_HttpError: [Errno 2] No such file or directory". A more relevant error message relating to the lack of network should be displayed.

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/vmnetx/app.py", line 108, in run
username, password)
File "/usr/local/lib/python2.7/dist-packages/vmnetx/execute.py", line 150, in __init__
password=password)
File "/usr/local/lib/python2.7/dist-packages/vmnetx/package.py", line 380, in __init__
password=password)
File "/usr/local/lib/python2.7/dist-packages/vmnetx/package.py", line 157, in __init__
raise _HttpError(str(e))
_HttpError: [Errno 2] No such file or directory
@ghost ghost assigned bgilbert Jul 12, 2013
@bgilbert
Copy link
Contributor

On Fedora 19 with Requests 1.1.0, I'm getting:

Traceback (most recent call last):
  File "/home/bgilbert/lib/python2.7/site-packages/vmnetx/ui/__init__.py", line 105, in run
    self._controller.initialize()
  File "/home/bgilbert/lib/python2.7/site-packages/vmnetx/controller/local/__init__.py", line 295, in initialize
    username=self.username, password=self.password)
  File "/home/bgilbert/lib/python2.7/site-packages/vmnetx/package.py", line 380, in __init__
    password=password)
  File "/home/bgilbert/lib/python2.7/site-packages/vmnetx/package.py", line 157, in __init__
    raise _HttpError(str(e))
_HttpError: [Errno -2] Name or service not known

Interestingly, "Errno -2" is "Errno 2" with a minus sign added.

Is this reproducible for you? What version of Requests are you running?

@dayoonc
Copy link
Contributor Author

dayoonc commented Jul 28, 2013

Running on Ubuntu 13.04 with requests 1.1.0-1, I am getting the same message in the original bug filing:

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/vmnetx/ui/__init__.py", line 105, in run
  self._controller.initialize()
File "/usr/local/lib/python2.7/dist-packages/vmnetx/controller/local/__init__.py", line 295, in initialize
  username=self.username, password=self.password)
File "/usr/local/lib/python2.7/dist-packages/vmnetx/package.py", line 380, in __init__
  password=password)
File "/usr/local/lib/python2.7/dist-packages/vmnetx/package.py", line 157, in __init__
  raise _HttpError(str(e))
_HttpError: [Errno 2] No such file or directory

There is no - sign in front of the 2. Also, not sure if this is relevant, but it looks like the actual error message is different as well: "Name or service not known" versus "No such file or directory".

@bgilbert
Copy link
Contributor

Right, that was my point. If -2 is the correct error, something in your library stack may be dropping the minus sign. 2 is indeed ENOENT.

@bgilbert
Copy link
Contributor

Unwinding the nested exceptions, it seems that the Errno 2 is coming directly from the getaddrinfo call in socket.create_connection, so this message is not due to a VMNetX bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants