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

IndexError wproxy.DIRECT #225

Open
svaningelgem opened this issue Sep 11, 2024 · 0 comments
Open

IndexError wproxy.DIRECT #225

svaningelgem opened this issue Sep 11, 2024 · 0 comments
Labels

Comments

@svaningelgem
Copy link

I got this error this morning:

----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 58976)
Traceback (most recent call last):
  File "socketserver.py", line 692, in process_request_thread
  File "socketserver.py", line 362, in finish_request
  File "socketserver.py", line 761, in __init__
  File "http\server.py", line 436, in handle
  File "PX\Lib\site-packages\px\handler.py", line 128, in handle_one_request
    http.server.BaseHTTPRequestHandler.handle_one_request(self)
  File "http\server.py", line 424, in handle_one_request
  File "PX\Lib\site-packages\px\handler.py", line 230, in do_GET
    self.do_curl()
  File "PX\Lib\site-packages\px\handler.py", line 159, in do_curl
    ipport = self.get_destination()
             ^^^^^^^^^^^^^^^^^^^^^^
  File "PX\Lib\site-packages\px\handler.py", line 257, in get_destination
    if servers[0] == wproxy.DIRECT:
       ~~~~~~~^^^
IndexError: list index out of range
----------------------------------------

The reason is normal: I didn't have any network at the time because my computer wasn't connected to either a cable or the wifi.

It would be nice to dump a nicer error message to say something like "Are you sure you're connected to the network?" instead of a stackdump ;-)

@genotrance genotrance added the bug label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants