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

Pathname with non-ASCII cause cannot extract ISO image #93

Closed
ShvonderSiN opened this issue Apr 2, 2015 · 19 comments
Closed

Pathname with non-ASCII cause cannot extract ISO image #93

ShvonderSiN opened this issue Apr 2, 2015 · 19 comments

Comments

@ShvonderSiN
Copy link

Installation Customizer went without problems. After installation, launched the utility. Clicked on the button Select ISO. Choose the image (Ubuntu, linux Mint) and nothing happens. In version 3.2.3 started unpacking but in this 4.1.0 nothing happens. Launched on LInux Mint 17.1 cinnamon.

@ghost
Copy link

ghost commented Apr 3, 2015

@ShvonderSiN
I didn't test Customizer on Linux Mint 17, since it is somewhat resource hungry (compared to, say, release 13 back then). But since I have a copy of Mint 17 32-bit ISO, I will try to reproduce this issue on my side. Will take some time to install on my virtual machine..

@ghost
Copy link

ghost commented Apr 3, 2015

@ShvonderSiN
Finally I managed to install Linux Mint 17 32-bit on my virtual machine.
The result? It is working fine from my testing.

The screenshot below shows I have selected Ubuntu Mini Remix 14.04 32-bit ISO into Customizer 4.1.0 from master branch, as proof.

mint17-install-ok

Please make sure you have read and follow the recommended way of installation, as I have noted in the point no.4 in the First guide page. Tested valid on Xubuntu and Linux Mint 32-bit host systems.

If you still face problem, please provide the output log and screenshot for our troubleshooting.

@ghost ghost added the Invalid label Apr 3, 2015
@ShvonderSiN
Copy link
Author

still experiencing the problem on my computer or in a virtual machine, does not begin unpacking. Linux Mint 17.1 cinnamon x64

@ghost
Copy link

ghost commented Apr 4, 2015

I can't help you because you don't provide any details of the problem.. Please provide the output log and screenshot when you face the problem.

Don't know how? Do I need to explain the lengthy steps?

  1. Run a Terminal
  2. In the Terminal, type sudo customizer-gui and hit Enter key (Customizer GUI should appear after a second or two)
  3. Click on Select ISO button and select any valid ISO image file (Customizer GUI should start extracting the image and there will be some output in the Terminal window also).

Copy and paste the Terminal output log on somewhere like GitHub Gists or Pastebin.

And provide the link to the content you have pasted in your reply here.

@ShvonderSiN
Copy link
Author

@ghost
Copy link

ghost commented Apr 6, 2015

@ShvonderSiN
Thanks for understanding and the output log. Now I have some idea why it didn't work on your system. I need more information to clarify this issue.

What locale (language encoding) are you using on your system?
Here's how to check:

  1. Run a Terminal
  2. Type locale and hit Enter key

Copy and paste the output from the Terminal window into your reply here.

@ShvonderSiN
Copy link
Author

LANG=ru_RU.UTF-8
LANGUAGE=
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=

@ghost
Copy link

ghost commented Apr 6, 2015

@ShvonderSiN
Thanks again. I think I found the cause of this issue.

At first, I changed my test machine locale to same as yours (ru_RU.UTF-8), but still failed to reproduce this issue. So this is not host system locale problem.

Next, I changed the ISO filename from English to Russian, and bingo! This issue can be reproduced with similar error. It was the filename locale problem.

The quick solution? As temporary workaround, please change your ISO image filename to using English alphanumeric characters only.

For example, if your ISO image filename is ubuntu-мини-ремикс.iso, please change to English filename ubuntu-mini-remix.iso.

Now, Customizer should be able to extract the ISO file properly.

@ghost ghost added Pending and removed Invalid labels Apr 6, 2015
@ShvonderSiN
Copy link
Author

I have all the names of the ISO without Cyrillic characters, as downloaded from the official websites so I kept. Just in case renamed one way just in cinnamon - it didn't help.
http://joxi.ru/p278nP8SpPeJA7

@ghost
Copy link

ghost commented Apr 6, 2015

I see.. this looks more tricky than I thought. Now I have different opinion: Customizer 4.1.0 might not read non-ASCII filenames, which is the reason seeing such error.

Even without the Cyrillic characters and even looks like using normal alphanumeric characters, those may not be using ASCII filenames.

To check this, do the following:

  1. Run a Terminal

  2. Change directory to where your ISO image files are located (For example, if your ISO image files are located in Downloads directory, then type cd Downloads and hit Enter key)

  3. Type python and hit Enter key (This will run Python in interactive mode)

  4. Copy and paste the following codes

     import chardet
     import os  
    
     for n in os.listdir('.'):
         print '%s => %s (%s)' % (n, chardet.detect(n)['encoding'], chardet.detect(n)['confidence'])
    
  5. Then, hit Enter key two times (You will see some output for each ISO image filenames).

  6. Finally, to exit Python interactive mode, press Ctrl-D or, type exit() and hit Enter key.

To summarize, do something like this (showing how I did on my test machine):

mint17-check-nonascii

Copy and paste the output in step 5 from the Terminal into your reply here.

@ShvonderSiN
Copy link
Author

import chardet
import os
for n in os.listdir('.'):
ct(n)['confidence'])> %s (%s)' % (n, chardet.detect(n)['encoding'], chardet.dete
...
chardet => ascii (1.0)
elementaryos-stable-amd64.20130810.iso => ascii (1.0)
linuxmint-17.1-mate-64bit.iso => ascii (1.0)
cinnamon.iso => ascii (1.0)
Linux => ascii (1.0)

.... ~/Загрузки/linux mint $

@ShvonderSiN
Copy link
Author

I found what the problem is. The problem is in the Cyrillic alphabet but not in the file name, but the path to him. My Downloads folder called Загрузки. So, I moved the ISO file in the home directory and from there, the ISO began to unpack normally. I hope soon you will fix this annoying bug, so i can use the program without restrictions, thanks for the help!!!

@ghost
Copy link

ghost commented Apr 6, 2015

@ShvonderSiN
Yes, I just realized that also.. Glad to find the cause of this issue.
Consider this issue as limitation for now.

Anyway, please provide the details from beginning next time.
With details you had provided in above steps, didn't we just find the cause faster than nothing?

@ghost ghost changed the title After selecting the ISO image, nothing happens Pathname with non-ASCII cause cannot extract ISO image Apr 6, 2015
@ghost ghost added the Official label Apr 6, 2015
fluxer added a commit that referenced this issue May 6, 2015
unicode has always been a problem both with Python 2 and 3. with
PyQt strings returned by dialogs and such as QString which have
to be normalized to able able to write them into the config and
all. Altough not this fixes some of the issues it can not do more
than handle strings properly _internally_, ConfigPraser still
fails because it attempts to convert the to string via str() thus
any chanages to the config will _not_ apply but atleast the
actions will execute now (after an error message) when paths have
unicode characters in them. feel free to improve on this.
fluxer added a commit that referenced this issue May 6, 2015
unicode has always been a problem both with Python 2 and 3. with
PyQt strings returned by dialogs and such are QString which have
to be normalized to be able to write them into the config and
all. Altough this fixes some of the issues it can not do more
than handle strings properly _internally_, ConfigPraser still
fails because it attempts to convert the key to string via str()
thus any chanages to the config will _not_ apply but atleast the
actions will execute now (after an error message) when paths have
unicode characters in them. feel free to improve on this.
@ranseyer
Copy link

I think i have the same problem. But my ISO-Name is simple...
(Customizer 4.1.1 ee119cf yesterday from git, Host: Linux Mint based on Ubuntu 14.04)

  => Creating: /home/martin/tmp/Customiz/FileSystem
  => Creating: /home/martin/tmp/Customiz/ISO
  => Creating mount directory
  => Mounting ISO: /tmp/1.iso
  => Checking ISO
  => Removing: /home/martin/tmp/Customiz/FileSystem
  => Removing: /home/martin/tmp/Customiz/ISO
  => Unmounting: /media/50xjL7
Traceback (most recent call last):
  File "/usr/sbin/customizer-gui", line 77, in run
    self.emit(QtCore.SIGNAL('failed'), unicode(detail))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 16: ordinal not in range(128)

Edit: Customizer 3.3.2 works fine with this ISO.

fluxer added a commit that referenced this issue May 17, 2015
@fluxer
Copy link
Collaborator

fluxer commented May 17, 2015

The issue should be fixed, I've tested it with ISO image that has unicode characters in it and is in directory that also has unicode characters in its name - works for me. The only requirement is that the host has unicode locales in use either set globally or via env. variable.

On a side note - major distributions build Python with --enable-unicode=ucs4 which breaks most of the modules when switching from Python build without that flag (at least for me) and on my setup Python is not build with it because of that so it may be the case that I have not catched all issues (but I'm pretty sure I have).

@ghost
Copy link

ghost commented May 18, 2015

Confirmed fix using Customizer with latest commit from master branch. Tested using Japanese unicode renamed in both folder and file names.

Below is screenshot as proof from my side.

xubuntu-1404-32bit-unicode-ja-ok

Also updated the Developer notes about this fix.

@fluxer
Copy link
Collaborator

fluxer commented May 18, 2015

@clearkimura
Thanks for testing.

@ranseyer
Copy link

I have retested the git version from now with kubuntu 14.04.2 and XUbuntu 13.10 that is updated to 14.04.02 (Pakages from today).

No more problem when i open an iso. Thanks!

@fluxer
Copy link
Collaborator

fluxer commented May 18, 2015

@ranseyer
Thank you too.

@fluxer fluxer added Fixed and removed Pending labels May 24, 2015
@fluxer fluxer closed this as completed May 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants