-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
cannot import name 'TDClient' from 'td.client' #7
Comments
There are 2 projects. It looks like td-ameritrade-python-api (which was v0.3.5) was sunset and now @areed1192 has been working on td-ameritrade-api (v0.1.1) Your Issue here is the same underlying problem as in this Discussion (td module not recognized) |
I think there may be an issue somewhere that's not letting pip install the However if you install it as editable by cloning this repo, and from within the root of the repo doing |
The most recent merge/commit #837315d has fixed this. |
Make sure td-ameritrade-python-api is uninstalled with This fixed the issue for me. Then follow the instructions provided in the ReadMe. |
Hello, I am having the following issue when I run the example from GIT:
runfile('C:/Users/iomega15/Desktop/td_example/using_td_library_git.py', wdir='C:/Users/iomega15/Desktop/td_example')
Reloaded modules: config, iomega15
Traceback (most recent call last):
File "C:\Users\iomega15\Desktop\td_example\using_td_library_git.py", line 25, in
client_id = config.get('main', 'client_id')
File "C:\Users\iomega15\anaconda3\lib\configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "C:\Users\iomega15\anaconda3\lib\configparser.py", line 1149, in _unify_values
raise NoSectionError(section) from None
NoSectionError: No section: 'main'
runfile('C:/Users/iomega15/Desktop/td_example/using_td_library.py', wdir='C:/Users/iomega15/Desktop/td_example')
Traceback (most recent call last):
File "C:\Users\iomega15\Desktop\td_example\using_td_library.py", line 15, in
from td.client import TDClient
ImportError: cannot import name 'TDClient' from 'td.client' (C:\Users\iomega15\anaconda3\Lib\site-packages\td\client.py)
I have also tried running it the youtube video way, but I get this issue:
ImportError: cannot import name 'TDClient' from 'td.client' (C:\Users\iomega15\anaconda3\Lib\site-packages\td\client.py)
I saw in the comments that it was a bug in the older version, but that was like a year ago and I just installed/updated the latest (as far as I can tell) from github: Successfully installed td-ameritrade-python-api-0.3.5
Though, I am a bit confused what the actual latest version is, because the github website says:
![image](https://user-images.githubusercontent.com/5264699/154830433-4c37e87f-4c98-47da-9273-d006d41b5ec2.png)
And in your youtube comments from a year ago you mentioned upgrading to 0.2.8 to eliminate this issue...
The text was updated successfully, but these errors were encountered: