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

Syncing fails with bad connectivity #5

Open
skriticos opened this issue Apr 25, 2009 · 0 comments
Open

Syncing fails with bad connectivity #5

skriticos opened this issue Apr 25, 2009 · 0 comments

Comments

@skriticos
Copy link
Owner

If the connectivity is bad and the XML is only partially read, the syncing fails and an IncompletRead exception is triggered. The app stays active though and syncing again with a better connectivity works fine. No data corruption. A suggested solution would be to put this part of the syncing in a try block and trigger a repeat with some delay if it occurs. Here is a trace:

Traceback (most recent call last):
File "/home/seth/Source/animecollector/src/AnimeCollector/gtkctl.py", line 51, in on_button_sync_clicked
if MODCTL.anime_data.sync():
File "/home/seth/Source/animecollector/src/AnimeCollector/myanimelist.py", line 89, in sync
remote_db = _fetch_list(self.username)
File "/home/seth/Source/animecollector/src/AnimeCollector/myanimelist.py", line 171, in _fetch_list
fetch_response = urlopen(fetch_url).read()
File "/usr/lib/python2.5/socket.py", line 304, in read
data = self._sock.recv(rbufsize)
File "/usr/lib/python2.5/httplib.py", line 509, in read
return self._read_chunked(amt)
File "/usr/lib/python2.5/httplib.py", line 554, in _read_chunked
value += self._safe_read(amt)
File "/usr/lib/python2.5/httplib.py", line 604, in _safe_read
raise IncompleteRead(s)
httplib.IncompleteRead: ['tatus>2</series_status>\n\t\t\t\t<series_start>1998-10-02</series_s ...

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

1 participant