Open ghost opened 5 years ago
I edited line#238 to
correct_info = correct_info.lower()
Just loops...
./amazoncontest.py
Welcome to the Amazon Giveaways Bot!
Checking connection...
Connected!
Please enter in your Amazon account information to begin
Email: sadsad
Password: asdasd
First Name: asdasd
Is this information correct? Yes or No: asdasd
Please enter in your Amazon account information to begin
Email: email@gmail.com
Password: pass!
First Name: name
Is this information correct? Yes or No: Yes
Please enter in your Amazon account information to begin
Email:
Not really sure why it's not working. It loops when the input does not equal, "yes". Are you putting a space in front of the input?
No I wasn't putting a space... I changed these lines around and it prints out "Loading Script Data..."
name = name.lower()
#Asks user if information is correct
correct_info = "yes"
correct_info = correct_info.lower()
I then get this error...
./amazoncontest.py
Welcome to the Amazon Giveaways Bot!
Checking connection...
Connected!
Please enter in your Amazon account information to begin
Email: email@gmail.com
Password: pass!
First Name: name
Loading script data, may take up to 10 minutes. Sit back and enjoy the prizes!
100% of data loaded, running script
Item #1
Could not load page
Contest has ended, continuing onward
Already Entered
Could not find winning status
Traceback (most recent call last):
File "./amazoncontest.py", line 264, in <module>
load_login_info()
File "./amazoncontest.py", line 244, in load_login_info
enter_contest(email, password, name)
File "./amazoncontest.py", line 180, in enter_contest
if did_you_win != first_name+", you didn't win":
UnboundLocalError: local variable 'did_you_win' referenced before assignment
So it looks like it is running, I will write up a readme file explaining some of the setup needed to make sure it's stable while running. I'll get back to you tomorrow.
Hey bud! Are you using python on Windows CMD or PowerShell or in Git-Bash? That path is designed for python on native GNU-Linux using bash. Python is located somewhere different in Windows, depending on whether you installed it for all users or just your user. If you are using a conda environment or anaconda, it will be at “%InstallPath%\Anaconda3\python.exe”.
Where it says TypeError: ‘str’ object is not callable, it’s because you have an object called correct_info, not a function called correct_info() . I don’t know how the python shell handles having a variable and a function named the same thing, but it should not care, so maybe you meant to make a function with the same name.
Sent from Mail for Windows 10
From: infosectester Sent: Monday, November 19, 2018 9:47 PM To: andrewelick/amazon-giveaway-bot Cc: Subscribed Subject: [andrewelick/amazon-giveaway-bot] Errors - Account Information (#1)
I am having some issues when entering account information. When I enter the account information it just loops... Please enter in your Amazon account information to begin Email: email@gmail.com Password: pass First Name: name Is this information correct? Yes or No: Yes Please enter in your Amazon account information to begin Email: I added the following to the stop of the scipt...
./amazoncontest.py
Welcome to the Amazon Giveaways Bot!
Checking connection...
Connected!
Please enter in your Amazon account information to begin
Email: email@gmail.com
Password: pass!
First Name: name
Is this information correct? Yes or No: Yes
Traceback (most recent call last):
File "./amazoncontest.py", line 264, in
To figure out where your copy of python is in anaconda, use this: where python or since most windows installations have “py3.exe” or “py.exe”, try it with these names instead. where py where py3
Sent from Mail for Windows 10
From: Andrew Elick Sent: Monday, November 19, 2018 11:00 PM To: andrewelick/amazon-giveaway-bot Cc: Subscribed Subject: Re: [andrewelick/amazon-giveaway-bot] Errors - Account Information(#1)
So it looks like it is running, I will write up a readme file explaining some of the setup needed to make sure it's stable while running. I'll get back to you tomorrow. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Also, if you installed python from anaconda, instead of from Python’s website, you might not find it using CMD, or PowerShell. I installed mine using Chocolatey, so it might have a weird installation.
Sent from Mail for Windows 10
From: Andrew Elick Sent: Monday, November 19, 2018 11:00 PM To: andrewelick/amazon-giveaway-bot Cc: Subscribed Subject: Re: [andrewelick/amazon-giveaway-bot] Errors - Account Information(#1)
So it looks like it is running, I will write up a readme file explaining some of the setup needed to make sure it's stable while running. I'll get back to you tomorrow. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
So the way i set it up I used the sys functions to be able to actively import the path that you need. It's been working on windows when I export it to a .exe. I installed python 3 directly from the website.
I am attempting to run on debian. I still run into the same error...
python3 amazoncontest.py
Welcome to the Amazon Giveaways Bot!
Checking connection...
Connected!
Please enter in your Amazon account information to begin
Email: email@gmail.com
Password: pass
First Name: name
Loading script data, may take up to 10 minutes. Sit back and enjoy the prizes!
100% of data loaded, running script
Item #1
Could not load page
Contest has ended, continuing onward
Already Entered
Could not find winning status
Traceback (most recent call last):
File "amazoncontest.py", line 264, in <module>
load_login_info()
File "amazoncontest.py", line 244, in load_login_info
enter_contest(email, password, name)
File "amazoncontest.py", line 180, in enter_contest
if did_you_win != name+", you didn't win":
UnboundLocalError: local variable 'did_you_win' referenced before assignment
@infosectester I was having a lot of issues with this on Ubuntu 16.04 as well. What version of python are you using? If 3.6 I would recomend 3.5 and also look at the try/except loops. There's no error dumping from any of the try loops so chances are you don't have a dependency met and it's silently failing to load there. Also I see that this post is a few months old and I don't see that var refrenced in code so I have to assume it's replaced with giveaway_results_text
. IF this is true you may want to clone more current version and give it a try. IF it still fails take a look and make sure you have selenium
, geckodriver
, and both in a version with firefox
that plays nice (refrence the ReadMe) as it would appear it fails in the line: giveaway_results_text = browser.find_element_by_id('title').text.lower()
. Again, looking at a different version of code so could be off base there. Feel free to reach out to me if you still have issues.
@andrewelick Is this still an open bug?
I am having some issues when entering account information. When I enter the account information it just loops...
I added the following to the stop of the scipt...
#!/usr/bin/python3
Any assistance would be greatly appreciated ;)