I want to use an FT232H for an university project as part of a larger code. The development environment is Pycharm on a Windows 10 PC with Python 3.10.7. For the first tests I tried to run the "Blinking LED" example code. I have saved the environment variable 'Blinka_FT232H=1' permanently in Windows. If I call the file in the windows command prompt via 'python Test.py', it works perfectly. In Pycharm, when I call the same code using subprocesses via 'subprocesses.call(["python", "Test.py"], shell=True)', I get the error message:
Traceback (most recent call last):
File "C:\Users\User\PycharmProjects\Project\Test.py", line 6, in <module>
led1 = digitalio.DigitalInOut(board.C0)
AttributeError: module 'board' has no attribute 'C0'
I assume, it's either due to a not working properly library or because Pycharm is not running the code in Windows command prompt but in its own terminal.
Thanks for all helpful comments
Problems FT232H and Pycharm
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Problems FT232H and Pycharm
I'm afraid we aren't familiar with the Pycharm environment. Maybe someone from the community will have more information.
- Donic
- Posts: 2
- Joined: Wed Nov 23, 2022 3:07 pm
Re: Problems FT232H and Pycharm
Hello Mike,
Thanks for pointing me in the right direction. I looked up Pycharm again and found an incorrect setting that was causing the error. Now the code is running and I can continue with the project.
Thanks for pointing me in the right direction. I looked up Pycharm again and found an incorrect setting that was causing the error. Now the code is running and I can continue with the project.
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Problems FT232H and Pycharm
Glad to hear you got things working. Happy hacking!
Please be positive and constructive with your questions and comments.