-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Pytest debug option "--debug" has problems to write non ASCII characters #7781
Comments
Can you please show the full stacktrace? |
I'm a little noob. What is exactly a "full stacktrace"? |
Maybe this is what are you talking about:
|
Yep, that - sorry for the missing explanation! 🙂 I think what's going on there is that Windows is using some encoding like latin1 by default for files, so pytest can't write the test name to it. No idea how to best fix it though, I didn't even know |
Yes, I discovered this option a couple of weeks ago, to develop some hooks to my testing. And I also don't know how to solve this encode issue. |
found another bug while fixing this (I'm fixing both)
|
@asottile I ran into this while debugging #9652. I saw the associated #7787 PR. Seeing the date of the last comment on that PR I thought I would post a little reminder about it. For example for |
pip list
from the virtual environment you are usingIntroduction
In my tests, I have some tests to check nonascii names for files. The test consists in import and compiles theses tests and everything works fine, but at the moment that I try to take a look in the execution of the hooks using the
pytest --debug
option the execution fail because pytest debug can't write the ascii character present in the Node ID of these tests, returning aUnicodeEncodeError
.pip list
commandaenum 2.2.4
alabaster 0.7.12
allure-pytest 2.8.10
allure-python-commons 2.8.10
appy 0.9.6
Arpeggio 1.9.2
atomicwrites 1.4.0
attrs 20.2.0
Babel 2.8.0
backcall 0.2.0
backports.functools-lru-cache 1.6.1
bcrypt 3.2.0
bitstruct 8.11.0
cached-property 1.5.1
cantools 32.16.0
certifi 2020.6.20
cffi 1.14.2
chardet 3.0.4
Click 7.0
colorama 0.4.3
control 0.8.3
cparser 0.1.3
cryptography 3.1
cycler 0.10.0
Cython 0.29.21
decorator 4.4.2
diskcache 5.0.3
docutils 0.14
dss-python 0.10.6
FMPy 0.2.14
future 0.18.2
idna 2.10
imagesize 1.2.0
iniconfig 1.0.1
ipython 7.18.1
ipython-genutils 0.2.0
jedi 0.14.1
Jinja2 2.11.2
kiwisolver 1.2.0
lark-parser 0.9.0
lxml 4.5.2
MarkupSafe 1.1.1
matplotlib 3.1.2
model-converter 1.4.4
more-itertools 8.5.0
npTDMS 0.23.0
numexpr 2.7.1
numpy 1.19.0
OpenDSSDirect.py 0.4.0
openpyxl 1.7.0
packaging 20.4
pandas 1.0.5
paramiko 2.7.1
parglare 0.10.0
parso 0.5.1
pathlib 1.0.1
Paver 1.3.4
PeakUtils 1.3.3
pickleshare 0.7.5
Pillow 7.2.0
pip 20.2.3
pluggy 0.13.1
prompt-toolkit 3.0.7
psutil 5.7.2
py 1.9.0
pycparser 2.20
pycryptodomex 3.9.8
pyFFTW 0.12.0
pygit2 1.2.1
Pygments 2.7.0
pyModbusTCP 0.1.8
PyNaCl 1.4.0
pyparsing 2.4.0
PyQt5 5.15.0
PyQt5-sip 12.8.1
pyqtgraph 0.11.0+gabfac52
PyQtWebEngine 5.15.0
pyserial 3.4
pytest 5.4.1
pytest-assume 2.2.0
python-can 3.3.3
python-dateutil 2.8.0
pytz 2019.1
pyusb 1.0.2
pywin32 228
pyzmq 19.0.1
QScintilla 2.11.4
requests 2.24.0
scipy 1.5.1
setuptools 47.1.0
sip 5.4.0
six 1.12.0
snowballstemmer 2.0.0
Sphinx 1.7.0
sphinxcontrib-programoutput 0.16
sphinxcontrib-serializinghtml 1.1.4
sphinxcontrib-websupport 1.2.4
tables 3.6.1
tabulate 0.8.3
textparser 0.23.0
textX 2.1.0
toml 0.10.1
traitlets 5.0.4
urllib3 1.25.10
wcwidth 0.2.5
wheel 0.35.1
win-inet-pton 1.1.0
windows-curses 2.1.0
wrapt 1.12.1
yapf 0.28.0
Pytest and OS versions
pytest-6.0.2 - Windows 10 (Home Edition)
A brief example
Conclusion
Any doubt about my explanation about this issue just ping me, Thanks!
The text was updated successfully, but these errors were encountered: