Comments (8)
@jgentil I think the package development is completely dead.
I have done a PR which haven't been merged yet.
My conclusion with this is that it does not always work as if you run multi or single user Python install it still breaks. I think the conclusion was with Python multi user install if you don't run cmd in admin it will install packages in AppData because of write permissions to C:/Program files so therefore it will create 2 Python locations which breaks it.
It sucks as I have some CLI things to test on Windows.
from wexpect.
The root-casue will be around process launching.
When the host process starts the console process, gets wring pid. the self.conpid
is different than ConsoleReader's os.getpid()
Enable logging, to see more details.
Host's self.conpid
matches with ConsoleReader
's os.getpid()
if wexpect not runs from venv.
from wexpect.
This is the root cause.
from wexpect.
This fix in dev branch seems to work well. Any chance of a new release?
from wexpect.
It looks like this Issue has also turned into a problem for virtualenv...
I ran into a situation where wexpect programs that worked well on a system with an older virtualenv environment do NOT work on systems with newer virtualenv environments. In the newer virtualenv environments, wexpect programs always fail with the same pywintypes.error that says 'The system cannot find the file specified.'
After some debugging, I discovered that wexpect programs still work correctly on all my systems if virtualenv is not used. (But this is not very desirable for me.)
Looking at the virtualenv changelog, I found a note on Release 20.0.34 that says "Align with venv module when creating virtual environments with builtin creator on Windows 3.7 and later"; I'm thinking this means that starting with virtualenv 20.0.34, wexpect no longer works in virtualenv environments, because they'll have the same problem as venv environments.
My current work-around is to simply use virtualenv 20.0.30 for all my wexpect programs. It's not the latest version of virtualenv, but it seems to allow my wexpect programs to continue to work on all my systems, at least for now.
from wexpect.
Thank this comment,
The 850eece shows a way to solve this issue in all virtualenv. This implementation does not uses the child process' pid to identify the pip.
from wexpect.
The 850eece worked for me, thanks!
If anyone needs help, you can use the following cmd inside an activated venv to install the fix:
pip install git+https://github.com/raczben/wexpect.git@dev
from wexpect.
Please release this!
from wexpect.
Related Issues (20)
- How to get the matching print? HOT 1
- Always TIMEOUT HOT 3
- always get Error: no spawn class: {spawn_class_name} when import wexpect HOT 1
- Fix hello_wexpect HOT 2
- Can't work with windows's ssh client? HOT 1
- Asyncio support
- wexpect throw UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 2999: unexpected end of data HOT 1
- Regex in expect fail in W10 and Python 3.9 HOT 2
- spawn hangs when run in virtual environment HOT 4
- Critical Performance Issue HOT 2
- pywintypes.error: (2, 'CreateFile', '系统找不到指定的文件') HOT 1
- logfile parameter not working in version 4.0.0 HOT 1
- Port overload when running multiple instances leads to timeout
- Stuck in loop trying to initialize pipe HOT 3
- Update testcases to work for Windows + write them in pytest
- command_with_path = shutil.which(self.command) breaks Windows command support
- Function of sendeof in Windows
- running too slow HOT 1
- wexpect.spawn(echo=False) is not work and setecho(False) is raise the "AttributeError: 'SpawnPipe' object has no attribute 'setecho'" exception.
- Can't get output of "dir" command on Windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wexpect.