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

PythonToCppException(UnicodeDecodeError) on Windows with special character in user profile path when launching an add-on #18557

Closed
1 of 6 tasks
mediaminister opened this issue Oct 12, 2020 · 5 comments · Fixed by #18580
Assignees
Labels
Platform: Windows Triage: Confirmed issue has been reproduced by a team member

Comments

@mediaminister
Copy link
Contributor

mediaminister commented Oct 12, 2020

Bug report

Describe the bug

On Windows systems with a special character in the user profile path like C:\Users\Amélie a PythonToCppException(UnicodeDecodeError) is thrown and the add-on fails to start.

This bug must have been introduced between July 28th and September 1st in the Kodi master branch because the error doesn't occur with Kodi 19 Alpha 1 and does occur with Kodi 19 20200901-4fec8426-master

Expected Behavior

Here is a clear and concise description of what was expected to happen:

The add-on should start normally.

Actual Behavior

The add-on doesn't start.

Possible Fix

To Reproduce

Steps to reproduce the behavior:

  1. Make sure you are on a Windows system with a special character in the user profile path like C:\Users\Amélie
  2. Install a Kodi 19 nightly build
  3. Launch Kodi
  4. Install the Kodi add-on of your choice
  5. A PythonToCppException is thrown of the type UnicodeDecodeError

Debuglog

The debuglog can be found here: https://paste.kodi.tv/okiyufaref.kodi

2020-10-12 11:49:56.698 T:4300     INFO <general>: initializing python engine.
2020-10-12 11:49:56.722 T:4300    ERROR <general>: CPythonInvoker(1, C:\Users\Amélie\AppData\Roaming\Kodi\addons\service.upnext\resources\lib\service_entry.py): C:\Users\Amélie\AppData\Roaming\Kodi\addons\service.upnext\resources\lib\service_entry.py not found!
2020-10-12 11:49:56.843 T:9612  WARNING <general>: CGUIMediaWindow::OnMessage - updating in progress
2020-10-12 11:49:57.272 T:4300    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'UnicodeDecodeError'>
                                                   Error Contents: 'utf-8' codec can't decode byte 0xf6 in position 11: invalid start byte
                                                   UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 11: invalid start byte
                                                   -->End of Python script error report<--
                                                   
2020-10-12 11:49:57.276 T:4300     INFO <general>: Python interpreter stopped

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

  • Android

  • iOS

  • Linux

  • OSX

  • Windows

  • Windows UWP

  • Operating system version/name: Windows 10 x64

  • Kodi version: Kodi 19 nightly build

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@xbmc-gh-bot xbmc-gh-bot bot added the Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it label Oct 12, 2020
@fuzzard fuzzard added Platform: Windows Triage: Confirmed issue has been reproduced by a team member and removed Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it labels Oct 13, 2020
fuzzard pushed a commit to fuzzard/xbmc that referenced this issue Oct 14, 2020
@romanvm
Copy link
Contributor

romanvm commented Oct 15, 2020

The attached log is not a debug one so it's missing some important log messages. Could you provide a real debug log?

@mediaminister
Copy link
Contributor Author

I'm sorry, here is a full debug log: https://paste.kodi.tv/okiyufaref.kodi

@romanvm
Copy link
Contributor

romanvm commented Oct 16, 2020

I think I know how to fix it. Please test this build: https://drive.google.com/file/d/1jnNg_khKeyIyhe5sD69DJSHeKl7aQKjR/view?usp=sharing

@mediaminister
Copy link
Contributor Author

I can confirm your build works. Thanks for fixing this so quickly.

@romanvm
Copy link
Contributor

romanvm commented Oct 16, 2020

Ok, then I'll do some more tests and submit a PR. Could someone assign this issue to me? I don't seem to have proper rights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Windows Triage: Confirmed issue has been reproduced by a team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants