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

Use tailored user-agent in requests to API #12

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

juhoinkinen
Copy link
Member

It can be nice to know from API logs when Annif-client is used.

@juhoinkinen juhoinkinen added the enhancement New feature or request label Aug 25, 2023
@juhoinkinen
Copy link
Member Author

I was about to merge this, but now I'm getting this error again, which somehow at first time got solved by reinstallation with pip install -e .:

Demonstrating usage of AnnifClient

* Creating an AnnifClient object
Traceback (most recent call last):
  File "annif_client.py", line 115, in <module>
    annif = AnnifClient()
  File "annif_client.py", line 17, in __init__
    version = importlib.metadata.version("annif-client")

@juhoinkinen
Copy link
Member Author

I was about to merge this, but now I'm getting this error again, which somehow at first time got solved by reinstallation with pip install -e .:

Demonstrating usage of AnnifClient

* Creating an AnnifClient object
Traceback (most recent call last):
  File "annif_client.py", line 115, in <module>
    annif = AnnifClient()
  File "annif_client.py", line 17, in __init__
    version = importlib.metadata.version("annif-client")

Switching to perform the import like from importlib import metadata somehow fixed the problem. But this was only needed for the application code, not for the tests... The situation is the same as described in this discussion.

@juhoinkinen juhoinkinen merged commit 5de6fc7 into master Aug 28, 2023
10 checks passed
@juhoinkinen juhoinkinen deleted the use-tailored-useragent branch August 28, 2023 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant