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

fixed bug to download geckodriver on linux 64bit #12

Merged

Conversation

LeydenJar
Copy link
Contributor

So, Even after filtering for the filenames wich matches linux os and that are 64 bit, the list filename still had 2 elements on it.

One was something like 'geckodriver-version.tar.gz' and the other was 'geckodriver-version.tar.gz.asc'

So this was making me fall into that exception

if len(filename) != 1: info_message = "Error, unable to determine correct filename for {0}bit {1}".format(bitness, os_name) logger.error(info_message)

So i just added this filtering to remove anything ending in asc from the filename list. Looks like it should be consistent

@elissonnog
Copy link

Could you be more specific where I have to change? I dont really understand.

@paqio
Copy link

paqio commented Jul 30, 2020

Could you be more specific where I have to change? I dont really understand.

a47a57c

@LeydenJar
Copy link
Contributor Author

@elissonnog

On the webdriverdownloader.py you change the line 320 from
filename = [name for name in filenames if os_name + bitness in name]
to
filename = [name for name in filenames if os_name + bitness in name and name[-3:] != 'asc' ]

@LeydenJar
Copy link
Contributor Author

LeydenJar commented Jul 30, 2020

A consideration: Maybe we should do something like

filename = [name for name in filenames if os_name + bitness in name and name[-7:] == '.tar.gz' ]

this seems slightly more consistent. Not a big deal tho...

Copy link

@AlfreddGco AlfreddGco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked for me!

@nupator
Copy link

nupator commented Sep 3, 2020

it says "that i dont have permission to edit this file" i tried to sudo gedit ~/usr/lib..../webdriverdownloader it opened a space so i can type but the file isnt there. so i pasted the code from there to the new file but it says that the location doesnt even exist. lol help me pls. XD new to ubuntu and stuff. @LeydenJar anyone?

@LeydenJar
Copy link
Contributor Author

@nupator try pasting this in the command line

pip show webdriverdownloader

this will give you some information about the webdriverdownloader package, including the path where it's located.

@nupator
Copy link

nupator commented Sep 10, 2020

WARNING: Package(s) not found: webdriverinstaller

@nupator
Copy link

nupator commented Sep 10, 2020

@LeydenJar ley

@nupator
Copy link

nupator commented Sep 10, 2020

###Also if i did pip install webdriverdownloader it shows me thisimage

@LeydenJar
Copy link
Contributor Author

@nupator looks like the package is installed on /usr/local/lib/python3.8/dist-packages/

Try to go there and use the ls command to see what's in there. Maybe navigating like this you can find the file.
Also don't forget to add ".py" at the end of the file name.

you want to do something like sudo nano /path/to/file/filename.py

I just wonder why pip show doesn't give you anything. Maybe you have conflicts between different pips. Are you using a virtual environment? Maybe you should consider it.

@nupator
Copy link

nupator commented Sep 13, 2020

Screen Shot 2020-09-13 at 4 06 26 PM

Screen Shot 2020-09-13 at 4 07 16 PM

yes this is a virtual machine. no such file or directory. so i did the nano but for /usr/local/lib/python3.8/dist-packages/ only

@nupator
Copy link

nupator commented Sep 13, 2020

@LeydenJar
👍

@LeydenJar
Copy link
Contributor Author

@nupator ok so, the cd command should be used to change the directory. As you specified the path to a .py file, it won't work cause it's a .py file and not a directory.

Try to cd on /usr/local/lib/......./dist-packages, then use the ls command to see if you can see the webdriverdownloader.py there.

If it is you should be able to use something like sudo nano webdriverdownloader.py and make the edits.

@Eduardovalenca
Copy link

Can someone help me please? mine still doesn't work, I tried to make the change that the friend above said but it's still the same
Captura de tela de 2020-10-10 10-38-10

@JacoSant
Copy link

Can someone help me please? mine still doesn't work, I tried to make the change that the friend above said but it's still the same
Captura de tela de 2020-10-10 10-38-10

Hi, you have resolve this? if yes how? i've try all things that the other people above said...

@ghost ghost deleted a comment Jun 16, 2021
@Venkateshvenki404224
Copy link

@elissonnog

On the webdriverdownloader.py you change the line 320 from
filename = [name for name in filenames if os_name + bitness in name]
to
filename = [name for name in filenames if os_name + bitness in name and name[-3:] != 'asc' ]

I couldn’t find the similar code on line 320 it’s some other code their

    filename = filename[0]

    result = json_data['assets'][filenames.index(filename)]['browser_download_url']
    logger.info("Download URL: {0}".format(result))
    return result

@leonidessaguisagjr leonidessaguisagjr merged commit ce7c2b6 into leonidessaguisagjr:master Jan 10, 2024
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

Successfully merging this pull request may close these issues.

10 participants