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

'NoneType' object has no attribute 'encode' #3

Open
masapasa opened this issue Sep 16, 2022 · 1 comment
Open

'NoneType' object has no attribute 'encode' #3

masapasa opened this issue Sep 16, 2022 · 1 comment

Comments

@masapasa
Copy link

python duneapi.py 1105134
Traceback (most recent call last):
File "duneapi-client-python/duneapi.py", line 106, in
rows = execute_query_and_get_results(query_id, api_key)
File "duneapi-client-python/duneapi.py", line 81, in execute_query_and_get_results
dune = DuneAPI(api_key)
File "duneapi-client-python/duneapi.py", line 25, in init
self.client = httpx.Client(headers=self.headers)
File "anaconda3/envs/jina/lib/python3.9/site-packages/httpx/_client.py", line 647, in init
super().init(
File "anaconda3/envs/jina/lib/python3.9/site-packages/httpx/_client.py", line 179, in init
self.headers = Headers(headers)
File "anaconda3/envs/jina/lib/python3.9/site-packages/httpx/_models.py", line 69, in init
self._list = [
File "anaconda3/envs/jina/lib/python3.9/site-packages/httpx/_models.py", line 73, in
normalize_header_value(v, encoding),
File "anaconda3/envs/jina/lib/python3.9/site-packages/httpx/_utils.py", line 54, in normalize_header_value
return value.encode(encoding or "ascii")
AttributeError: 'NoneType' object has no attribute 'encode'

@SusmeetJain
Copy link
Contributor

Did you add your API key to your local environment before running this script?

$ export DUNE_API_KEY="YOUR_API_KEY"

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

No branches or pull requests

2 participants