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

Compatibility with Windows COM ports #10

Open
Hebertl opened this issue Dec 22, 2021 · 1 comment
Open

Compatibility with Windows COM ports #10

Hebertl opened this issue Dec 22, 2021 · 1 comment

Comments

@Hebertl
Copy link

Hebertl commented Dec 22, 2021

Hi,

This tool works well when I run my python project from inside of WSL ubuntu for example when I connect to a serial port via a /dev/tty6 file in my Ubuntu filesystem.

However when I try to run the same script on windows (in an anaconda env) opening a pyserial connection to COM6 instead of ubuntu's /dev/tty6, I get the error message:
ImportError: cannot import name 'spawn' from 'pexpect'

This does make sense to me since pexpect's docs has disclaimers that its spawn class doesn't work on Windows OS and that popen_spawn would be better to use instead.

I see in your readme, though, that you do have a COM# in your instantiation of serial.Serial, which you then pass as an arugment to your SerialSpawn class:
with serial.Serial('COM1', 115200, timeout=0) as ser:

So I was wondering: have you gotten this to work on windows, despite pexpect's disclaimer about its spawn class? Just wondering if I'm missing something.

-Luke H

@sbluatx
Copy link

sbluatx commented Jul 5, 2022

i'm having the same exact problem! what is the solution to this? thx

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

No branches or pull requests

2 participants