Cannot refresh public IP randomly
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- networking
Research direction
Start with blessclient/user_ip.py, especially getIP, _refreshIP, and _fetchIP, then trace the call from blessclient/client.py. Reproduce the cold-run timeout using the two listed public-IP endpoints and verify that a first run completes without raising "Could not refresh public IP".
Written by the indexing model from the issue text.
Description
On occasion, on the first cold run:
DEBUG:root:Cache get disabled
DEBUG:root:Cache get disabled
DEBUG:root:Getting current public IP DEBUG:root:Could not refresh public IP from http://api.ipify.org Traceback (most recent call last): File "/home/marc/.blessclient/blessclient/user_ip.py", line 53, in _fetchIP
with contextlib.closing(urlopen(url, timeout=2)) as f: File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 429, in open response = self._open(req, data) File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 447, in _open
'_open', req) File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(*args)
File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 1228, in http_open return self.do_open(httplib.HTTPConnection, req) File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 1201, in do_open r = h.getresponse(buffering=True) File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/httplib.py", line 1136, in getresponse response.begin() File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/httplib.py", line 453, in begin version, status, reason = self._read_status() File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/httplib.py", line 409, in _read_status
line = self.fp.readline(_MAXLINE + 1)
File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/socket.py", line 480, in readline data = self._sock.recv(self._rbufsize) timeout: timed out
DEBUG:root:Could not refresh public IP from http://canihazip.com
Traceback (most recent call last):
File "/home/marc/.blessclient/blessclient/user_ip.py", line 53, in _fetchIP
with contextlib.closing(urlopen(url, timeout=2)) as f: File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data) File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 447, in _open '_open', req) File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(*args) File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req) File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 1201, in do_open r = h.getresponse(buffering=True)
File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/httplib.py", line 1136, in getresponse response.begin() File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/httplib.py", line 453, in begin version, status, reason = self._read_status() File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/httplib.py", line 409, in _read_status line = self.fp.readline(_MAXLINE + 1)
File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/socket.py", line 480, in readline
data = self._sock.recv(self._rbufsize)
timeout: timed out
Traceback (most recent call last):
File "/home/marc/.blessclient/blessclient.run", line 11, in <module>
load_entry_point('blessclient', 'console_scripts', 'blessclient')()
File "/home/marc/.blessclient/blessclient/client.py", line 643, in main
bless(region, args.nocache, args.gui, args.host, bless_config)
File "/home/marc/.blessclient/blessclient/client.py", line 547, in bless
my_ip = userIP.getIP()
File "/home/marc/.blessclient/blessclient/user_ip.py", line 29, in getIP
self._refreshIP()
File "/home/marc/.blessclient/blessclient/user_ip.py", line 43, in _refreshIP
raise Exception('Could not refresh public IP')
Exception: Could not refresh public IP
Immediately re-running this works.
- Dominant language
- Python
- Stars
- 117
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lyft/python-blessclient
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
lyft/python-blessclient#27 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
lyft/python-blessclient#26 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
lyft/python-blessclient#22 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 28/100
lyft/python-blessclient#20 · 2 comments ·
All issues in lyft/python-blessclient
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
learningequality/ricecooker#747 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
run-llama/llama_index#23199 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
KhronosGroup/glTF-Blender-IO#2769 ·