MrS0m30n3 / youtube-dl-gui

A cross platform front-end GUI of the popular youtube-dl written in wxPython.
The Unlicense
9.3k stars 1.59k forks source link

UnicodeDecodeError in gettext when the starting path contains unicode characters #230

Open Dimsok opened 7 years ago

Dimsok commented 7 years ago

I did try the last portable version, and it gives me:

 Traceback (most recent call last):
  File "youtube-dl-gui", line 35, in <module>
  File "youtube_dl_gui\__init__.pyc", line 43, in <module>
  File "gettext.pyc", line 569, in install
  File "gettext.pyc", line 541, in translation
  File "gettext.pyc", line 524, in find
  File "ntpath.pyc", line 85, in join
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc0 in position 1: ordinal not in range(128)

The previous version, available here, starts normal.

MrS0m30n3 commented 7 years ago

I will try so hard not to mark this as invalid.

I did try the last portable version

You refer to version 0.4? Did you download it from our site or from another source?

The previous version, available here

Which one? Version 0.3.8?

Dimsok commented 7 years ago

From releases there. 0.4 was not started. 0.3.8 is ok.

MrS0m30n3 commented 7 years ago

From what location (path) do you run youtube-dlg? Does the path contain non-english characters? Do you have Python installed on your system?

Dimsok commented 7 years ago

I have python 2.7.2. Yes, it was cyrillic in path. As i remember, python even in latest version works only with latin path. From the root of the disk program starts. But 0.3.8 started anyway.

MrS0m30n3 commented 7 years ago

Ok follow the steps below and paste the results here, between triple quotes (```like this```).

  1. Open a command line prompt (cmd.exe)
  2. Type python and hit Enter (this should put you in the python console)
  3. Copy and paste into the python console the code from below
    
    import os
    import sys

results = []

This line will tell us the values of the below environment variables in your system

for envar in ('LANGUAGES', 'LANG', 'LC_ALL', 'LC_MESSAGES'): results.append(os.environ.get(envar))

This line will give us the default directory for the translation files

results.append(os.path.join(sys.prefix, 'share', 'locale'))

print results # Paste the results between triple quotes

Dimsok commented 7 years ago

[None, 'en', None, None, 'C:\Program Files\python\share\locale']

Dimsok commented 7 years ago

Anyway it doesn't work for me. When i add link it's always 0 percentage. When i close, it gives me:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "threading.pyc", line 801, in __bootstrap_inner
  File "youtube_dl_gui\downloadmanager.pyc", line 599, in run
  File "youtube_dl_gui\downloaders.pyc", line 162, in download
  File "youtube_dl_gui\downloaders.pyc", line 337, in _create_process
  File "subprocess.pyc", line 390, in __init__
  File "subprocess.pyc", line 640, in _execute_child
WindowsError: [Error 193] %1 is not a valid Win32 application
Dimsok commented 7 years ago

Found out why. I placed youtube-dl.exe near the youtube-dl-gui, but it should be in application data. Not very portable.

MrS0m30n3 commented 7 years ago

The second traceback looks like a completly different issue. How did you manage to start the application and recover from the first one?

Also, regarding the portability of youtube-dl.exe please read issue https://github.com/MrS0m30n3/youtube-dl-gui/issues/65.

Dimsok commented 7 years ago

How did you manage to start the application and recover from the first one?

I didn't recover. I just start from with no cyrillic. If honestly i don't have necessity to use it from such path. It was just for quick testing when i've put it there.

MrS0m30n3 commented 7 years ago

Regarding the first issue, i'm really intrested to see if we can fix it on our side.

I wasn't able to reproduce this on my system so, i would really appreciate it if you could follow the steps below and help me solve this.

  1. Download this portable version (special portable version to create more verbose log output)
  2. Place it in the path with the cyrillic characters that gave you the first error
  3. Run the youtube-dl-gui.exe (the program should crash as the first time)
  4. Now you should have a log file with the name logfile_issue230 in the same directory with the youtube-dl-gui.exe
  5. Drag and drop that file (logfile_issue230) here in the comments section