-
Notifications
You must be signed in to change notification settings - Fork 10
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
etf.info Raising error '"dictionary update sequence element #4 has length 0; 2 is required" #21
Comments
Merged
I have found the fix to the above. In etf_client.py, within the _profile_container function I added a condition to ensure the record has length of 2 before appending it to 'results'. Updated code below:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The error I'm experiencing is below. Any call I make to the .info method produces the error, but other methods are working just as they should. It has something to do with the library retrieving and converting data into dictionary format. Any help with this would be appreciated.
Traceback (most recent call last):
File "/Users/yourName/Downloads/ETF_Project/env/lib/python3.12/site-packages/etfpy/etf.py", line 61, in info
return self._basic_info()
^^^^^^^^^^^^^^^^^^
File "/Users/yourName/Downloads/ETF_Project/env/lib/python3.12/site-packages/etfpy/client/etf_client.py", line 288, in _basic_info
basic_information.update(self._profile_container())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yourName/Downloads/ETF_Project/env/lib/python3.12/site-packages/etfpy/client/etf_client.py", line 101, in _profile_container
return dict(results)
^^^^^^^^^^^^^
ValueError: dictionary update sequence element #4 has length 0; 2 is required
The text was updated successfully, but these errors were encountered: