complexpotato / Faitagram

(Doesn't work anymore)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help, ValueError: need more than 2 values to unpack

DolayDong opened this issue · comments

i'm following this link sir, null-byte.wonderhowto.com but i get problem like this..

this is setup.py file
`import os, math, sys

#OS_bit = (round(math.log(sys.maxint,2)+1)) # get the bit

os.system("sudo apt-get install python-pip && sudo apt-get install tor") # installing dependencies
os.system("pip install -U selenium")
os.system("pip install Pysocks")
os.system("pip install pyvirtualdisplay && apt-get install xvfb")

#print("\n \n {} \n \n".format(OS_bit))

os.system('firefox -v > tmp') # store result of firefox -v in tmp
result = open('tmp', 'r').read() # result var reads the output
marker = result.find('Firefox') + 8 # marker marks the 8th letter from the word "Firefox"
version = result[marker:].splitlines()[0] # spliting the output, the version is something like aa.bb.cc
a,b,c = version.split(".") # a is the var with the aa
os.remove('tmp') # removing the temporary file

FirefoxVersion = int(a)
second = 0

if FirefoxVersion < 53:

first = 16
second = 1
OS_bit = 64

elif FirefoxVersion == 53 or FirefoxVersion == 54:
print(marker)
first = 18

elif FirefoxVersion > 54:

first = 19

os.system("wget https://github.com/mozilla/geckodriver/releases/download/v0.{}.{}/geckodriver-v0.{}.{}-linux{}.tar.gz".format(first,second,first,second,OS_bit))
os.system("tar -xvzf geckodriver-v0.{}.{}-linux{}.tar.gz".format(first,second,OS_bit))
os.system("rm geckodriver-v0.{}.{}-linux{}.tar.gz".format(first,second,OS_bit))
os.system("chmod +x geckodriver")
os.system("mv geckodriver /usr/local/bin/")
chmod +x faitagram && chmod +x setup.py`

and this the error..

root@sapto-linux:/home/dolay/Faitagram# python setup.py
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-pip is already the newest version (18.1-5).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
tor is already the newest version (0.4.1.5-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Requirement already up-to-date: selenium in /usr/local/lib/python2.7/dist-packages (3.141.0)
Requirement already satisfied, skipping upgrade: urllib3 in /usr/local/lib/python2.7/dist-packages (from selenium) (1.25.8)
Requirement already satisfied: Pysocks in /usr/local/lib/python2.7/dist-packages (1.7.1)
Requirement already satisfied: pyvirtualdisplay in /usr/local/lib/python2.7/dist-packages (0.2.5)
Requirement already satisfied: EasyProcess in /usr/local/lib/python2.7/dist-packages (from pyvirtualdisplay) (0.2.10)
Reading package lists... Done
Building dependency tree
Reading state information... Done
xvfb is already the newest version (2:1.20.5+git20191008-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Traceback (most recent call last):
File "setup.py", line 17, in
a,b,c = version.split(".") # a is the var with the aa
ValueError: need more than 2 values to unpack

i'm sorry sir, i'm not good to speak english... can somebody help me please... Thank you very much