defaultnamehere / zzzzz

Roleplay as the NSA by making creepy graphs of your friends
MIT License
1.3k stars 131 forks source link

'Namespace' object has no attribute 'cookie' #26

Open felipedmesquita opened 8 years ago

felipedmesquita commented 8 years ago

Probably an issue with SECRETS.txt. the file looks like this now: (with the numbers letters altered and the cookie redacted)

uid=100000232323239
cookie=datr=JuOSKadJDmdiU8_gn3djr4B; locale=en_US; c_user=[Redacted cookie]wd=882x749
client_id=88c9g39b

Terminal outputs:

Felipes-MacBook-Air:zzzzz-master felipe$ python fetcher.py Traceback (most recent call last): File "fetcher.py", line 8, in import graph File "/Users/felipe/Downloads/zzzzz-master/graph.py", line 6, in import flap File "/Users/felipe/Downloads/zzzzz-master/fbapi.py", line 4, in import fetcher File "/Users/felipe/Downloads/zzzzz-master/fetcher.py", line 25, in class Fetcher(): File "/Users/felipe/Downloads/zzzzz-master/fetcher.py", line 31, in Fetcher 'cookie': secrets.cookie, AttributeError: 'Namespace' object has no attribute 'cookie'

knock-in commented 8 years ago

Yep it's probably an issue with SECRETS.txt. Look at line 14:

with open("SECRETS.txt") as f:
    for line in f:
        vals = line.strip().split('=', 1)
        setattr(secrets, vals[0].lower(), vals[1])

It splits each line at '=' and sets the left part as the attribute name and the right part as the attribute value. If you just want to get it running you could replace secrets.cookie at line 31 with your actual value which is: datr=JuOSKadJDmdiU8_gn3djr4B; locale=en_US; c_user=[Redacted cookie]wd=882x749 client_id=88c9g39b

(with the numbers letters altered and the cookie redacted)

pielco11 commented 6 years ago

The mistake is in your SECRETS.txt file. The cookie field must be something like: cookie='cookie values here'. Plus your SECRETS.txt looks really different from mine, make sure to copy it correctly from your browser.