-
Notifications
You must be signed in to change notification settings - Fork 23
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
logger crashes at the end of the program #37
Comments
this looks relevant to my exception:
|
I've run your snippet, with no error... Can you describe your setup to help reporduce the issue? |
That snippet was just the setup, later in your test you would need to run some normal wexpect scenarios... spawning and expecting. Maybe this bug was only in the last release (v 3.3.0)? |
Also, are you using Python > version 3.4? I was using 3.6 |
I use:
Note, that wexpect requires Python 3.5 or higher because the Literal String Interpolation aka. Python f-Strings I have added your snippet at the beginning of the hello_wexpect example which results the following code, but it still run with no errors. I cannot reproduce your problem. Can you help me? '''
This is the simplest example. It starts a windows command interpreter (aka. cmd) lists the current
directory and exits.
'''
import os
os.environ['WEXPECT_SPAWN_CLASS'] = 'SpawnPipe'
os.environ['WEXPECT_LOGGER_LEVEL']='INFO'
from wexpect import spawn
from wexpect import TIMEOUT, EOF
# Start cmd as child process
child = spawn('cmd.exe')
# Wait for prompt when cmd becomes ready.
child.expect('>')
# Prints the cmd's start message
print(child.before, end='')
print(child.after, end='')
# run list directory command
child.sendline('ls')
# Waiting for prompt
child.expect('>')
# Prints content of the directory
print(child.before, end='')
print(child.after, end='')
# Exit from cmd
child.sendline('exit')
# Waiting for cmd termination.
child.wait() |
ok, this issue is a result of me having a class in the file... it doesn't seem to matter where it's defined, before or after imports, before or after the
|
trying to set that ENV var in the script:
yields this error at the end of my script
The text was updated successfully, but these errors were encountered: