pytest-dev / pytest-html

Plugin for generating HTML reports for pytest results
Other
697 stars 235 forks source link

encoding error #106

Closed micheletest closed 7 years ago

micheletest commented 7 years ago

I just tried to update to the latest pytest html and I'm getting an encoding error. The line referred to isn't encoded that I see, so perhaps that needs an update. I can try to look more into this later.

metadata: {'Python': '2.7.13', 'Driver': 'Remote', 'Capabilities': {'browserName': 'chrome', 'screenResolution': '1440x900'}, 'Server': 'http://selenium-server:4444', 'Base URL': 'http://local.better.com:3000', 'Platform': 'Linux-4.4.23-31.54.amzn1.x86_64-x86_64-with', 'Plugins': {'bdd': '2.18.1', 'variables': '1.5.1', 'selenium': '1.9.1', 'rerunfailures': '2.1.0', 'html': '1.14.1', 'timeout': '1.2.0', 'base-url': '1.3.0', 'metadata': '1.3.0'}, 'Packages': {'py': '1.4.32', 'pytest': '3.0.6', 'pluggy': '0.4.0'}}
rootdir:  inifile: pytest.ini
plugins: variables-1.5.1, timeout-1.2.0, selenium-1.9.1, rerunfailures-2.1.0, metadata-1.3.0, html-1.14.1, bdd-2.18.1, base-url-1.3.0
timeout: 480.0s method: signal
collected 2 items 

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 98, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 133, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
INTERNALERROR>     _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 154, in pytest_runtestloop
INTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
INTERNALERROR>     _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
INTERNALERROR>     return _wrapped_call(hook_impl.function(*args), self.execute)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 254, in _wrapped_call
INTERNALERROR>     return call_outcome.get_result()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 280, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
INTERNALERROR>     self.result = func()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
INTERNALERROR>     return _wrapped_call(hook_impl.function(*args), self.execute)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 254, in _wrapped_call
INTERNALERROR>     return call_outcome.get_result()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 280, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
INTERNALERROR>     self.result = func()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pytest_rerunfailures.py", line 96, in pytest_runtest_protocol
INTERNALERROR>     item.ihook.pytest_runtest_logreport(report=report)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
INTERNALERROR>     _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pytest_html/plugin.py", line 469, in pytest_runtest_logreport
INTERNALERROR>     self.append_other(report)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pytest_html/plugin.py", line 293, in append_other
INTERNALERROR>     self._appendrow('Rerun', report)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pytest_html/plugin.py", line 249, in _appendrow
INTERNALERROR>     result = self.TestResult(outcome, report, self.logfile, self.config)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pytest_html/plugin.py", line 114, in __init__
INTERNALERROR>     self.append_extra_html(extra, extra_index, test_index)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pytest_html/plugin.py", line 199, in append_extra_html
INTERNALERROR>     href = data_uri(content)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pytest_html/plugin.py", line 77, in data_uri
INTERNALERROR>     data = b64encode(content)
INTERNALERROR>   File "/usr/lib/python2.7/base64.py", line 54, in b64encode
INTERNALERROR>     encoded = binascii.b2a_base64(s)[:-1]
INTERNALERROR> UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 56830: ordinal not in range(128)
davehunt commented 7 years ago

Interesting.. it looks like your test is being timed out by pytest-timeout. Perhaps that is causing an issue with pytest-html. I had hoped that all the encoding issues were fixed, but they keep popping up! If you're able to create a test for this that would be really helpful.

micheletest commented 7 years ago

Agree, this seems to do with pytest-timeout. I can replicate this locally when it times out, but only in that case. What fixes the issue for me is to remove the if PY3 in data_uri (line 74 of plugin.py) and let it encode/decode the content in all cases.

I'm having trouble running the tests which I want to do before adding a new one. Are there preconditions to get going? Just doing pytest doesn't work for me. - /Library/Python/2.7/site-packages/_pytest/config.py:1280: AttributeError: 'NoneType' object has no attribute 'option'

davehunt commented 7 years ago

I'm having trouble running the tests which I want to do before adding a new one. Are there preconditions to get going? Just doing pytest doesn't work for me.

The tests are run using tox, so you'll need to pip install that first. This manages the Python versions and virtual environments for you. For example, to run the tests against the latest version of Python and pytest, run: tox -e py36-pytest30, or for Python 2.7: tox -e py27-pytest30

davehunt commented 7 years ago

I have a potential fix in #108. Please give that a try and let me know if it's working for you.

micheletest commented 7 years ago

Just marked on the PR, this fixed the issue for me. Thanks for looking into it.

davehunt commented 7 years ago

Thanks @micheletest! I've merged and tagged, so v1.14.2 should be available soon!

chennareddy08 commented 5 years ago

i am still getting below mentioned error

INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages_pytest\main.py", line 185, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages_pytest\main.py", line 225, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\hooks.py", line 284, in call INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\manager.py", line 67, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\manager.py", line 61, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(args) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages_pytest\main.py", line 246, in pytest_runtestloop INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\hooks.py", line 284, in call INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\manager.py", line 67, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\manager.py", line 61, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(args) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages_pytest\runner.py", line 76, in pytest_runtest_protocol INTERNALERROR> runtestprotocol(item, nextitem=nextitem) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages_pytest\runner.py", line 91, in runtestprotocol INTERNALERROR> reports.append(call_and_report(item, "call", log)) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages_pytest\runner.py", line 175, in call_and_report INTERNALERROR> hook.pytest_runtest_logreport(report=report) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\hooks.py", line 284, in call INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\manager.py", line 67, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\manager.py", line 61, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm\teamcity\pytest_plugin.py", line 319, in pytest_runtest_logreport INTERNALERROR> self.report_test_output(report, test_id) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm\teamcity\pytest_plugin.py", line 236, in report_test_output INTERNALERROR> dump_test_stdout(self.teamcity, test_id, test_id, data) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm\teamcity\common.py", line 73, in dump_test_stdout INTERNALERROR> messages.testStdOut(test_id, chunk, flowId=flow_id) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm\teamcity\messages.py", line 167, in testStdOut INTERNALERROR> self.message('testStdOut', name=testName, out=out, flowId=flowId) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm_jb_runner_tools.py", line 113, in message INTERNALERROR> _old_service_messages.message(self, messageName, **properties) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm\teamcity\messages.py", line 81, in message INTERNALERROR> self.output.write(self.encode(message)) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm\teamcity\messages.py", line 48, in encode INTERNALERROR> value = value.encode(self.encoding) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\encodings\cp1252.py", line 12, in encode INTERNALERROR> return codecs.charmap_encode(input,errors,encoding_table) INTERNALERROR> UnicodeEncodeError: 'charmap' codec can't encode character '\ufffd' in position 52359: character maps to

rafi4135 commented 1 year ago

i am still getting below mentioned error

INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages_pytest\main.py", line 185, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages_pytest\main.py", line 225, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\hooks.py", line 284, in call INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\manager.py", line 67, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\manager.py", line 61, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(args) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages_pytest\main.py", line 246, in pytest_runtestloop INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\hooks.py", line 284, in call INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\manager.py", line 67, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\manager.py", line 61, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(args) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages_pytest\runner.py", line 76, in pytest_runtest_protocol INTERNALERROR> runtestprotocol(item, nextitem=nextitem) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages_pytest\runner.py", line 91, in runtestprotocol INTERNALERROR> reports.append(call_and_report(item, "call", log)) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages_pytest\runner.py", line 175, in call_and_report INTERNALERROR> hook.pytest_runtest_logreport(report=report) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\hooks.py", line 284, in call INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\manager.py", line 67, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\manager.py", line 61, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pluggy\callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm\teamcity\pytest_plugin.py", line 319, in pytest_runtest_logreport INTERNALERROR> self.report_test_output(report, test_id) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm\teamcity\pytest_plugin.py", line 236, in report_test_output INTERNALERROR> dump_test_stdout(self.teamcity, test_id, test_id, data) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm\teamcity\common.py", line 73, in dump_test_stdout INTERNALERROR> messages.testStdOut(test_id, chunk, flowId=flow_id) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm\teamcity\messages.py", line 167, in testStdOut INTERNALERROR> self.message('testStdOut', name=testName, out=out, flowId=flowId) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm_jb_runner_tools.py", line 113, in message INTERNALERROR> _old_service_messages.message(self, messageName, **properties) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm\teamcity\messages.py", line 81, in message INTERNALERROR> self.output.write(self.encode(message)) INTERNALERROR> File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\helpers\pycharm\teamcity\messages.py", line 48, in encode INTERNALERROR> value = value.encode(self.encoding) INTERNALERROR> File "C:\Users\cbiradar\AppData\Local\Programs\Python\Python37-32\lib\encodings\cp1252.py", line 12, in encode INTERNALERROR> return codecs.charmap_encode(input,errors,encoding_table) INTERNALERROR> UnicodeEncodeError: 'charmap' codec can't encode character '\ufffd' in position 52359: character maps to

Did you find a solve?

rcase128 commented 1 year ago

@rafi4135 Try installing pytest-dev version 4.0.0rc4. This fixed this issue for myself.