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

add package argument for resources.files() #49

Merged
merged 1 commit into from
Jul 21, 2024

Conversation

znarfm
Copy link
Contributor

@znarfm znarfm commented Jul 21, 2024

running bing-rewards in the terminal opens a browser window, however, exits prematurely since there happens to be something missing in the code itself.

note: bing-rewards installed using pipx.

$ bing-rewards
Doing 33 desktop searches
Press ESC to quit searching
Opening browser [1508]
Exception in thread Thread-1 (both):
Traceback (most recent call last):
  File "C:\Users\meina\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "C:\Users\meina\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\meina\AppData\Local\pipx\pipx\venvs\bing-rewards\Lib\site-packages\bing_rewards\__init__.py", line 213, in both
    desktop()
  File "C:\Users\meina\AppData\Local\pipx\pipx\venvs\bing-rewards\Lib\site-packages\bing_rewards\__init__.py", line 201, in desktop
    search(count, words_gen, options.desktop_agent, options)
  File "C:\Users\meina\AppData\Local\pipx\pipx\venvs\bing-rewards\Lib\site-packages\bing_rewards\__init__.py", line 149, in search
    query = next(words_gen)
            ^^^^^^^^^^^^^^^
  File "C:\Users\meina\AppData\Local\pipx\pipx\venvs\bing-rewards\Lib\site-packages\bing_rewards\__init__.py", line 53, in word_generator
    word_data = resources.files().joinpath('data', 'keywords.txt')
                ^^^^^^^^^^^^^^^^^
TypeError: files() missing 1 required positional argument: 'package'

@znarfm znarfm changed the base branch from master to develop July 21, 2024 07:53
@jack-mil
Copy link
Owner

for reference, what version of python are you using?

@znarfm
Copy link
Contributor Author

znarfm commented Jul 21, 2024

I'm using Python 3.11.9.

@jack-mil
Copy link
Owner

oops, I used a 3.12 feature. Thanks for the catch 👍
image

@jack-mil jack-mil merged commit 6e3dd64 into jack-mil:develop Jul 21, 2024
jack-mil added a commit that referenced this pull request Jul 21, 2024
hotfix: `package` argument for `resources.files()` (#49)
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.

2 participants