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

Some refactoring to fix Linux support #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

valericus
Copy link

@valericus valericus commented Jan 4, 2022

Hi!

I've tried to use this package with Linux Mint and faced with following exception.

Traceback (most recent call last):
  File "/home/valera/code/personal/project/main.py", line 1, in <module>
    from pygeckodriver import geckodriver_path
  File "/home/valera/code/personal/project/venv/lib/python3.8/site-packages/pygeckodriver/__init__.py", line 37, in <module>
    geckodriver_path = _get_filename()
  File "/home/valera/code/personal/project/venv/lib/python3.8/site-packages/pygeckodriver/__init__.py", line 29, in _get_filename
    path += file_extension
TypeError: can only concatenate str (not "NoneType") to str

So I've looked through source code and found a problem with file_extension variable. Minimal fix to make it work looks like

---      file_extension = None
+++      file_extension = ''

But I think some refactoring makes this code a bit more readable and error-proof.

Fixes #5

@valericus
Copy link
Author

Also I've updated update.py script to ignore .asc files.

@spacepost
Copy link

I just had to make this same change and was coming out here to write up the same issue. Can confirm that these changes fix the issue I was encountering in linux as well.

@spacepost
Copy link

I created an issue for this, but I can't link your PR to it since I didn't create it. You should associate this to the issue: Linux Support Issue #5

@valericus
Copy link
Author

I created an issue for this, but I can't link your PR to it since I didn't create it. You should associate this to the issue: Linux Support Issue #5

Done, thank you for the issue.

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.

Linux Support Issue
2 participants