Skip to content

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