Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Python Python, why wont you work on windows 10

simong1993

Gold Coder
Staff Team
Guardian
Good Morning you lovely lot,

I have windows 10 on my main PC and linux on my laptop, my aim is to automate my buisness so auto facebook post instead of me manualy doing it. Reading messages and replying with price etc etc etc. thats my long term plan running it from my Rasberry PI. On the PI code works but on windows 10 selenium refuses to work :( anyone have any idea on how i get this to work.

Thanks all :D
 
I've installed python 3.8 in Windows 10 and pip install selenium.

I've executed python from the command line so that I'm in the python command line interface.
I started entering your code at the python command line interface to see that everything executes OK. When I get to the line browser = webdriver.Firefox() I get an error saying that 'geckodriver' needs to be in the path.

I should've read this: https://selenium-python.readthedocs.io/installation.html - this indicates that 'geckodriver' is needed, or whatever other driver based on what browser you're using.

Not sure about the rest of the setup though. If you're running your code from a file maybe it's not reporting this error in a terminal somewhere, as it probably terminates before you get a chance to see it.
 
Last edited:
Make sure you have the correct PATH variables for the Python installation and make sure you have all dependencies. Additionally, make sure you are using the correct command when you launch / run, such as python3 script.py instead of python script.py. Make sure you are using the command set for your current and specific installation - this definitely comes into play if you have multiple versions of Python installed.
 
I did manage to get it to work in the end :) although windows 10 is being a pain, for some reason new installs are corrupting them selfs :s I've got quite far with my script but I'm now getting my head around one writing but not needing a input box to select, so for example loading a page and typeing hello on the keyboard and two working out variables so I can use loops. Then it's going to be working out how to take things and insert things into my database but so far I'm loving the language, I even bought my rasberry pi some heat sinks, a case and fan
 
I did manage to get it to work in the end :) although windows 10 is being a pain, for some reason new installs are corrupting them selfs :s I've got quite far with my script but I'm now getting my head around one writing but not needing a input box to select, so for example loading a page and typeing hello on the keyboard and two working out variables so I can use loops. Then it's going to be working out how to take things and insert things into my database but so far I'm loving the language, I even bought my rasberry pi some heat sinks, a case and fan
That’s awesome I’m glad you got it sorted and making much progression! I’ve been doing Python lately as well but on Codeacademy but felt very overwhelmed on what they were saying. But managed to get through it. However with your installations are you noticing any error messages anywhere? But of course if you’ve found a solution from here or elsewhere could you please mark it as the solution so others can get help from it, please and thank you :)
 

New Threads

Buy us a coffee!

Back
Top Bottom