Skip to content
This repository has been archived by the owner on Nov 4, 2019. It is now read-only.

Traceback Error (Python 2.7.10, Mac OS X 10.13.x) on Update command #4

Open
johntdavis84 opened this issue Nov 15, 2018 · 3 comments
Open

Comments

@johntdavis84
Copy link

johntdavis84 commented Nov 15, 2018

Hello,

I'm getting an unusual traceback when I try to run the update command. I haven't tweaked the code at all, so I'm not really sure what's going on.

Rayna:YahooGroups-Archiver-master johntdavis$ python ./archive_group.py NAPP-Practice

Archiving group 'NAPP-Practice', mode: update , on Thu Nov 15 10:18:55 2018
Traceback (most recent call last):
  File "./archive_group.py", line 134, in <module>
    archive_group(sys.argv[1])
  File "./archive_group.py", line 67, in archive_group
    max = group_messages_max(groupName)
  File "./archive_group.py", line 89, in group_messages_max
    return pageJson["ygData"]["totalRecords"]
UnboundLocalError: local variable 'pageJson' referenced before assignment
Rayna:YahooGroups-Archiver-master johntdavis$ python version
python: can't open file 'version': [Errno 2] No such file or directory

Something is going wonky with the return pageJson["ygData"]["totalRecords"] call, but I'm not really familiar with the JSON frameworks, so I'm not sure what.

(I just got a great deal on a Python 3 learning bundle, so I'm getting ready to re-learn what I used to know and pick up the new stuff. Exciting.)

@andrewferguson
Copy link
Owner

Hi John,
This might be because NAPP-Practice is a private group. Have you updated the cookie_Y and cookie_T variables at the top of the script? (There's rough instructions in the README, I can clarify if you don't understand).
That being said, the script should never crash and should always exit gracefully, so I'll try and have a more detailed look in the next few days and see if I can work out what's going wrong.

@johntdavis84
Copy link
Author

johntdavis84 commented Nov 15, 2018 via email

@andrewferguson
Copy link
Owner

I'm glad that allowed you to run the script (and that you find it useful). I'm still not sure why it crashes when the cookies aren't set correctly on that group, will investigate more when I have the time.

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

No branches or pull requests

2 participants