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

Failure in uIdMatch.search parameters #1

Closed
corywright opened this issue May 28, 2012 · 3 comments
Closed

Failure in uIdMatch.search parameters #1

corywright opened this issue May 28, 2012 · 3 comments

Comments

@corywright
Copy link

I've had BaGoMa crash a couple times now while downloading all my mail. This one, however, didn't crash the program but kept running.

1% 223/20251 ERROR    Error retrieving message
Traceback (most recent call last):
  File "./bagoma.py", line 523, in __init__
    self['uid'] = uIdMatch.search(data[0][0]).group(1)
TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 842, in emit
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 719, in format
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 464, in format
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 328, in getMessage
TypeError: %d format: a number is required, not str
Logged from file bagoma.py, line 276
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 842, in emit
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 719, in format
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 464, in format
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 328, in getMessage
TypeError: %d format: a number is required, not str
Logged from file bagoma.py, line 276
@gburca
Copy link
Owner

gburca commented May 29, 2012

It looks like you're getting UID's that are not numeric. Can you run it with '--log DEBUG' option and capture the standard output? For example: "bagoma.py [options...] > debug.log"

If you send me the debug.log file to gburca dash bagoma at ebixio dot com, I'll take a look and see what's happening.

@gburca
Copy link
Owner

gburca commented May 29, 2012

It looks like the useful IMAP information is logged to stderr. You'll need to redirect both stdout and stderr by adding "2>&1" at the end of your command above, so you'll end up with: "bagoma.py [options...] > debug.log 2>&1"

Please delete any sensitive information (especially the LOGIN line) from that file before sending it.

@corywright
Copy link
Author

When I re-ran the script a couple times it finally worked, and eventually completed backing up my mail. From now on when I run my backup script I'll capture stderr in case this happens again.

It's possible that there are non-numeric UID's in my mailbox, as I imported a lot of old mail into Gmail a few years ago.

@gburca gburca closed this as completed Feb 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants