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

ValueError: too many values to unpack #9

Open
Amnesthesia opened this issue Oct 21, 2013 · 5 comments
Open

ValueError: too many values to unpack #9

Amnesthesia opened this issue Oct 21, 2013 · 5 comments

Comments

@Amnesthesia
Copy link

Crashes with "ValueError: too many values to unpack" when going through all the downloaded data in the end if a user has 'too many' friends or is found in too many photos (I think?).

There are also some problems with encoding when it parses the timeline. Changing str() calls to unicode() worked for me.

@milo2012
Copy link
Owner

Hi Amnesthesia, would you mind to share the lines which you have changed so that I can update the code as well as to test ?
It would be great if you could share 3 lines before and 3 lines after the 'problem' code. Thanks

@milo2012
Copy link
Owner

Thank you for your time and help on this btw.

@Amnesthesia
Copy link
Author

Well, I'll attach what I changed but keep in mind I don't actually speak Python, I was just trying to troubleshoot it and googled around a bit and thought that might be a viable solution. But if you treat the strings as bytestrings somewhere, then this might not work well at all :x But it got rid of the encoding issue for me at least (though some letters still turn out strange, but it doesn't cause a problem).

Basically, I just changed all str() calls in: def parseTimeline(html,username) to unicode() calls instead.

@cndnheat
Copy link

[] Caching Photo Page: 146781xxxxxx
[
] Caching Photo Page: 157740500xxx
[] Writing 0 record(s) to database table: photosCommented
list index out of range
xxxxx_friends.htm
[
] Caching Friends Page of: xxxxxxx
Traceback (most recent call last):
File "fbstalker1.py", line 2030, in
options(sys.argv)
File "fbstalker1.py", line 1974, in options
mainProcess(user)
File "fbstalker1.py", line 1871, in mainProcess
dataList = parseFriends(html)
File "fbstalker1.py", line 1659, in parseFriends
month,year = value.split(" ")
ValueError: too many values to unpack

Is there a resolution in sight for this? It causes the script to abort.....

@Hipasspot
Copy link

Hi milo2012,

Big thanks for making a very interesting script.

Tried the Fbstalker script and got the ValueError: too many values to unpack. My first reaction was that something was wrong with my setup but since others have experienced something similar I just want to ask if somebody have figured out this issue. I don't seem to be able to get around it. I use Kali 32 in virtualbox, I have time to test things if you need anything tested. As I understand it there is an imbalance between the left and right sides of the statement month, year = value.split(" "), but I really don't know what I am talking about.

[*] Caching Friends Page of: nameoftarget
Traceback (most recent call last):

File "fbstalker.py", line 2030, in
options(sys.argv)

File "fbstalker.py", line 1974, in options
mainProcess(user)

File "fbstalker.py", line 1871, in mainProcess
dataList = parseFriends(html)

File "fbstalker.py", line 1659, in parseFriends

month,year = value.split(" ")
ValueError: too many values to unpack

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

4 participants