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

Error import fdpexpect in some files in the folder Firmware/tools/ #47

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

luisan00
Copy link

@luisan00 luisan00 commented Sep 5, 2018

System Ubuntu 18.04 4.15.0-33-generic
Executing some python scripts in /Firmware/tools/ appears the next error:

Traceback (most recent call last): File "./show_regs.py", line 4, in <module> import serial, sys, optparse, time, fdpexpect ImportError: No module named fdpexpect
This error can be avoided changing:
import fdpexpect
by:
from pexpect import fdpexpect

avoids ImportError: No module named fdpexpect
avoids ImportError: No module named fdpexpect
avoids ImportError: No module named fdpexpect
avoids ImportError: No module named fdpexpect
avoids ImportError: No module named fdpexpect
avoids ImportError: No module named fdpexpect
avoids ImportError: No module named fdpexpect
@akissu
Copy link

akissu commented Jul 30, 2019

Using the latest pexpect PIP package for python2.7, and using from pexpect import fdpexpect import, returns the following error for me.

Connecting (use ^] to exit)                                                      
Traceback (most recent call last):                                               
  File "Firmware/tools/console.py", line 28, in <module>                          
    ser.interact()                                                               
AttributeError: 'fdspawn' object has no attribute 'interact' 

I can get things working by installing a pre 3.0 version of the package pip install "pexpect<3". The reality is that the python tools haven't been updated since 2012 and pexpect has been refactored a lot.

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

Successfully merging this pull request may close these issues.

2 participants