wubi-r129.exe crashes when python 2.2 is preinstalled.

Bug #365501 reported by petebisson
36
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Wubi
Confirmed
Medium
Agostino Russo

Bug Description

wubi-r129.exe from http://people.ubuntu.com/~evand/wubi/jaunty/
Windows XP SP3 on Thinkpad r50e

I have used this build of wubi (in fact this exact file!) successfully on two other XP SP3 machines, but when trying it on the Thinkpad it does not appear to do anything.

More specifically, a pylXX.tmp.exe and a pylXX.tmp folder are created in %TEMP% but then the folder is immediately deleted and the process quits.

Note that the wubi GUI never starts, so no wubi logs get created.

I am happy to provide further information, but need pointing in the right direction :-)
. Is there a way of diagnosing/logging exactly what is happening on this machine?
. Are there any dependencies for unpacking wubi that may be missing from this machine?

EDIT:
The thinkpad has C:\IBMTOOLS\Python22 in %path%
Is this likely to affect the package?
None of the other machines that it worked successfully on have any python versions.

Tags: iso-testing
description: updated
Revision history for this message
Agostino Russo (ago) wrote :

It will require a special build in order to see more messages, we will provide one in the coming days. An existing python version should not change thing, but you might want to try running without python22 (it should be sufficient to remove it from PATH and PYTHONHOME env variables).

Revision history for this message
petebisson (o-launchpad-bisson-co-uk) wrote : Re: [Bug 365501] Re: wubi-r129.exe does nothing.

> try running without python22
I tried this, and it made no difference.

> It will require a special build in order to see more messages
Assuming that the "special" build will simply be a debug one, I tried
wubi-r117-debug.exe as that is available from the same place.

This is the error the thinkpad gets with wubi-r117-debug.exe
-------------------------
C:\u-904>wubi-r117-debug.exe

C:\u-904>Traceback (most recent call last):
  File "Z:\home\evan\bzr\wubi.trunk\build\wubi\files\main.py", line 23, in ?
  File "Z:\home\evan\bzr\wubi.trunk\build\wubi\files\lib\wubi\application.py",
line 26, in ?
  File "Z:\home\evan\bzr\wubi.trunk\build\wubi\files\lib\wubi\backends\win32\__init__.py",
line 1, in ?
  File "Z:\home\evan\bzr\wubi.trunk\build\wubi\files\lib\wubi\backends\win32\backend.py",
line 33, in ?
  File "Z:\home\evan\bzr\wubi.trunk\build\wubi\files\lib\wubi\backends\common\__init__.py",
line 1, in ?
  File "Z:\home\evan\bzr\wubi.trunk\build\wubi\files\lib\wubi\backends\common\backend.py",
line 42, in ?
  File "Z:\home\evan\bzr\wubi.trunk\build\wubi\files\lib\wubi\backends\common\signature.py",
line 29, in ?
  File "Z:\home\evan\bzr\wubi.trunk\build\wubi\files\lib\openpgp\sap\api.py",
line 49, in ?
  File "Z:\home\evan\bzr\wubi.trunk\build\wubi\files\lib\openpgp\sap\crypto.py",
line 47, in ?
  File "Z:\home\evan\bzr\wubi.trunk\build\wubi\files\lib\openpgp\sap\crypto.py",
line 47, in ?
ImportError: No module named Util.number

C:\u-904>
--------------------------

One of the other machines (that worked with r129) loads the GUI with
r117-debug and asks me if I want to uninstall.
I don't want to, so I stopped there, but the GUI loaded with no
traceback on the console.

A different machine (not previously installed with wubi) loads the
r117-debug GUI fine with no traceback.
As I don't want Ubuntu on that machine I stopped at that point.

If I still need to try a special build, I'll do that when you let me
know where to get it from.

Cheers,

Pete

Revision history for this message
Agostino Russo (ago) wrote : Re: wubi-r129.exe does nothing.

Hmm you should have a file in the temp folder called lib/Crypto/Util/number.pyo
It would be interesting to see Util.__file__

Revision history for this message
S. Tuncer Erdogan (tuncer) wrote :

I got a similar problem and I really don't know where to look to diagnose it.

On an Windows XP SP3 HP Pavilion machine with AMD Athlon CPU, the GUI seems to try hard to start, but it simply does not.

I attached the log file in temp folder. By the way, one interesting line of log:
04-24 10:52 DEBUG Distro: checking Ubuntu ISO D:\kubuntu-8.10-desktop-amd64.iso

I don't know what it means, but Wubi is started from another subdirectory (With kubuntu-9.04-desktop-amd64.iso file)
04-24 10:52 DEBUG CommonBackend: original_exe=D:\linux\setup\wubi.exe

I may provide additional details, if you say so.

Revision history for this message
Agostino Russo (ago) wrote :

Erdogan,

The content of .disk/info inside of your ISO seems incorrect, probably the ISO is corrupted or a partial download. That shouldn't be fatal though. The issue is different from parent, please open a different bug report

04-24 10:52 DEBUG WindowsBackend: extracting .disk\info from D:\kubuntu-8.10-desktop-amd64.iso
04-24 10:52 DEBUG Distro: info=ÖdʼPt”Gzyí¢ ¼k8­ZÉë|{è÷Ï%¾Ú¸ *Mu‹¦8ãº+Œ5-‚&i‰

Changed in wubi:
assignee: nobody → Agostino Russo (ago)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
petebisson (o-launchpad-bisson-co-uk) wrote : Re: [Bug 365501] Re: wubi-r129.exe does nothing.
Download full text (3.8 KiB)

> Hmm you should have a file in the temp folder called lib/Crypto/Util/number.pyo
> It would be interesting to see Util.__file__

The temp folder gets immediately deleted before I can see the contents.

To try and get the chance to see what happens, I have pulled lp:wubi
and built wubizip on a separate machine.

Results on the thinkpad:
---------------------------------

C:\u-904\wubi>python.exe main.py --verbose
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "main.py", line 23, in ?
    from wubi.application import Wubi
  File "C:\u-904\wubi\lib\wubi\application.py", line 26, in ?
    from wubi.backends.win32 import WindowsBackend
  File "C:\u-904\wubi\lib\wubi\backends\win32\__init__.py", line 1, in ?
    from backend import WindowsBackend
  File "C:\u-904\wubi\lib\wubi\backends\win32\backend.py", line 33, in ?
    from wubi.backends.common.backend import Backend
  File "C:\u-904\wubi\lib\wubi\backends\common\__init__.py", line 1, in ?
    from backend import Backend
  File "C:\u-904\wubi\lib\wubi\backends\common\backend.py", line 42, in ?
    from signature import verify_gpg_signature
  File "C:\u-904\wubi\lib\wubi\backends\common\signature.py", line 29, in ?
    from openpgp.sap.api import verify_str
  File "C:\u-904\wubi\lib\openpgp\sap\api.py", line 49, in ?
    import openpgp.sap.crypto as CRYPT
  File "C:\u-904\wubi\lib\openpgp\sap\crypto.py", line 47, in ?
    import Crypto.Util.number as NUM
  File "C:\u-904\wubi\lib\openpgp\sap\crypto.py", line 47, in ?
    import Crypto.Util.number as NUM
ImportError: No module named Util.number

C:\u-904\wubi>python.exe -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
'import site' failed; traceback:
ImportError: No module named site
# C:\u-904\wubi\lib\warnings.pyc matches C:\u-904\wubi\lib\warnings.py
import warnings # precompiled from C:\u-904\wubi\lib\warnings.pyc
# C:\u-904\wubi\lib\types.pyc matches C:\u-904\wubi\lib\types.py
import types # precompiled from C:\u-904\wubi\lib\types.pyc
# C:\u-904\wubi\lib\linecache.pyc matches C:\u-904\wubi\lib\linecache.py
import linecache # precompiled from C:\u-904\wubi\lib\linecache.pyc
# C:\u-904\wubi\lib\os.pyc matches C:\u-904\wubi\lib\os.py
import os # precompiled from C:\u-904\wubi\lib\os.pyc
import nt # builtin
# C:\u-904\wubi\lib\ntpath.pyc matches C:\u-904\wubi\lib\ntpath.py
import ntpath # precompiled from C:\u-904\wubi\lib\ntpath.pyc
# C:\u-904\wubi\lib\stat.pyc matches C:\u-904\wubi\lib\stat.py
import stat # precompiled from C:\u-904\wubi\lib\stat.pyc
# C:\u-904\wubi\lib\UserDict.pyc matches C:\u-904\wubi\lib\UserDict.py
import UserDict # precompiled from C:\u-904\wubi\lib\UserDict.pyc
# C:\u-904\wubi\lib\copy_reg.pyc matches C:\u-904\wubi\lib\copy_reg.py
import copy_reg # precompiled from C:\u-904\wubi\lib\copy_reg.pyc
Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> ^Z

# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type...

Read more...

Revision history for this message
Agostino Russo (ago) wrote : Re: wubi-r129.exe does nothing.

Please add some logging before openpgp\sap\crypto.py line 47:

log.debug(path)
import Util
log.debug(Util.__file__)

To disable dir deletion edit src/pylauncher/pylauncher.c and comment out:

delete_directory(targetdir);

Then rebuild

Revision history for this message
Agostino Russo (ago) wrote :

it's actually

import sys
log.debug(sys.path)
import Crypto
log.debug(Crypto.__file__)
import Crypto.Util
log.debug(Crypto.Util.__file__)

Revision history for this message
petebisson (o-launchpad-bisson-co-uk) wrote : Re: [Bug 365501] Re: wubi-r129.exe does nothing.
Download full text (3.7 KiB)

-------
C:\u-904\wubi>python.exe main.py --verbose
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "main.py", line 23, in ?
    from wubi.application import Wubi
  File "C:\u-904\wubi\lib\wubi\application.py", line 30, in ?
    from wubi.backends.win32 import WindowsBackend
  File "C:\u-904\wubi\lib\wubi\backends\win32\__init__.py", line 1, in ?
    from backend import WindowsBackend
  File "C:\u-904\wubi\lib\wubi\backends\win32\backend.py", line 33, in ?
    from wubi.backends.common.backend import Backend
  File "C:\u-904\wubi\lib\wubi\backends\common\__init__.py", line 1, in ?
    from backend import Backend
  File "C:\u-904\wubi\lib\wubi\backends\common\backend.py", line 42, in ?
    from signature import verify_gpg_signature
  File "C:\u-904\wubi\lib\wubi\backends\common\signature.py", line 29, in ?
    from openpgp.sap.api import verify_str
  File "C:\u-904\wubi\lib\openpgp\sap\api.py", line 49, in ?
    import openpgp.sap.crypto as CRYPT
  File "C:\u-904\wubi\lib\openpgp\sap\crypto.py", line 48, in ?
    log.debug(sys.path)
NameError: name 'log' is not defined

----------

That didn't seem to work, so I tried manually:

--------
C:\u-904\wubi>python -v
Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

>>> import Crypto.Util
import Crypto # directory C:\u-904\wubi\lib\Crypto
import Crypto # from C:\u-904\wubi\lib\Crypto\__init__.py
# wrote C:\u-904\wubi\lib\Crypto\__init__.pyc
import Crypto.Util # directory C:\u-904\wubi\lib\Crypto\Util
import Crypto.Util # from C:\u-904\wubi\lib\Crypto\Util\__init__.py
# wrote C:\u-904\wubi\lib\Crypto\Util\__init__.pyc
>>> Crypto.Util.__file__
'C:\\u-904\\wubi\\lib\\Crypto\\Util\\__init__.py'

>>> import Crypto
>>> Crypto.__file__
'C:\\u-904\\wubi\\lib\\Crypto\\__init__.py'

>>> import Crypto.Util.number
import Crypto.Util.number # from C:\u-904\wubi\lib\Crypto\Util\number.py
# wrote C:\u-904\wubi\lib\Crypto\Util\number.pyc
import Crypto.PublicKey # directory C:\u-904\wubi\lib\Crypto\PublicKey
import Crypto.PublicKey # from C:\u-904\wubi\lib\Crypto\PublicKey\__init__.py
# wrote C:\u-904\wubi\lib\Crypto\PublicKey\__init__.pyc
import struct # builtin
>>> Crypto.Util.number.__file__
'C:\\u-904\\wubi\\lib\\Crypto\\Util\\number.py'

--------

2009/4/24 Agostino Russo <email address hidden>:
> it's actually
>
> import sys
> log.debug(sys.path)
> import Crypto
> log.debug(Crypto.__file__)
> import Crypto.Util
> log.debug(Crypto.Util.__file__)
>
> --
> wubi-r129.exe does nothing.
> https://bugs.launchpad.net/bugs/365501
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Wubi, Windows Ubuntu Installer: Confirmed
>
> Bug description:
> wubi-r129.exe from http://people.ubuntu.com/~evand/wubi/jaunty/
> Windows XP SP3 on Thinkpad r50e
>
> I have used this build of wubi (in fact this exact file!) successfully on two other XP SP3 machines, but when trying it on the Thinkpad it does not appear to do anything.
>
> More specifically, a pylXX.tmp.exe and a pylXX.tmp folder are created in %TEMP% but then the folder is immediately del...

Read more...

Revision history for this message
Agostino Russo (ago) wrote : Re: wubi-r129.exe does nothing.

Yes, you need the logging module as well. Manual import seems fine.

Revision history for this message
Koby Kahane (kobykahane) wrote :

Any word on this? Wubi still doesn't work for me as of r134. I have a ThinkPad R50e with XP SP3, just like the OP. Originally used Wubi to install 8.10, but have had this issue with the 9.04 Wubi (when picking up the debug build I have the same Util.number import error as the OP, even after removing C:\IBMTOOLS\Python2.2 from my PATH. Wubi doesn't even get to the point of writing its log file, etc.)

Revision history for this message
Agostino Russo (ago) wrote :

I have tried to install python 2.2 but cannot replicate this. You will have to add some log.debug statements in the code and narrow it down.

Revision history for this message
Fabian Kegel (you-got-mail) wrote :

Any news on that?
I downloaded Wubi from http://wubi-installer.org/, tried to install it on a IBM Thinkpad T42 and as well nothing happens.

Revision history for this message
Agostino Russo (ago) wrote :
Revision history for this message
Fabian Kegel (you-got-mail) wrote :

Hi, same result. Nothing happens. Any other ideas? Fabian

Revision history for this message
Tomatejc (tomatejc) wrote :

I have this exactly problem too. I'm sorry, my english is very bad.

Revision history for this message
Agostino Russo (ago) wrote :

Please post the logs, they are in your user temp folder (%temp%)

Revision history for this message
petebisson (o-launchpad-bisson-co-uk) wrote :

Hi Agostino,

I have not been paying any attention to this recently, but it seems to be affecting a few other people too.

As I raised this, I feel morally obliged to help you diagnose it :-)

I *think* the problem all us thinkpad users are having is that nearly all the OEM tools installed on the thinkpad are written in python (2.2).

My gut feeling is that there is a conflict somewhere between the OEM tools and the wubi installer, but I don't know how to track it down.

I suspect it is in the logger itself - the OEM config on this thinkpad explicitly defines a PYTHONPATH environment variable (%SystemDrive%\IBMTOOLS\utils\support;%SystemDrive%\IBMTOOLS\utils\logger)

If you tell me what to try, I'll give it a go in the next few days.

Cheers,

Pete

Revision history for this message
petebisson (o-launchpad-bisson-co-uk) wrote :

Quick update on this:

I pulled and built wubizip from trunk this morning, and have played with it a bit.

If I modify openpgp/sap/crypto.py and comment out line 47:
# import Crypto.Util.number as NUM

Then I get the wubi frontend and a logfile (attached).

Obviously wubi chokes when it tries to check the file signatures, but this is further than I have got the python wubi to run previously.

Let me know what else to try, and I'll get back to you.

Cheers,

Pete

Revision history for this message
petebisson (o-launchpad-bisson-co-uk) wrote :

UPDATE: Workaround available

You may close this issue as I can now run wubi on the thinkpad.

This is actually a system configuration problem, not a bug in wubi.

The thinkpad has the environment variable PYTHONCASEOK set.

It appears to be a common known issue with certain thinkpads, as a quick search for PYTHONCASEOK will confirm. There seem to be a lot of Python developers who think IBM is a four letter word :-D

I have tried a few variations of this, with mixed results.

Executing python.exe -E main.py - works with wubizip builds

Unsetting PYTHONCASEOK at a command prompt does not allow wubi to run.

Setting PYTHONCASEOK to any value other than 1 does not allow wubi to run.

Cheers,

Pete

Feel free to add this to the FAQs if you like.

-----
Thinkpad Workaround to use Wubi 9.04

1. Right click on My Computer, select Properties
OR
Go to Control Panel -> System

2. On the 'Advanced' tab click the 'Environment Variables' button.

3. In the bottom pane ('System Variables') scroll down the list until you find the PYTHONCASEOK variable.

4. Highlight the PYTHONCASEOK line and click the 'Delete' button. (Just changing the value will not work.)

5. Reboot your thinkpad.

6. Run wubi.exe, and enjoy :-)

7. After installing wubi, you need to re-add PYTHONCASEOK with a value of 1 or your assorted IBM tools will not work.

NOTE: You will also need to repeat steps 1-5 if you want to uninstall wubi in the future, as the wubi uninstaller will have the same problem. Don't forget to do step 7 again after running the wubi uninstaller.

Revision history for this message
petebisson (o-launchpad-bisson-co-uk) wrote :

Actually I found an easier method:

INSTALL:
Create a new text file containing these two lines:

SET PYTHONCASEOK=
wubi.exe

Save the file with the name wubi-install.bat in the same folder as your downloaded wubi.exe

Double click the wubi-install.bat batch file to install.

UNINSTALL
Create a new text file containing these two lines:

SET PYTHONCASEOK=
uninstall-wubi.exe

Save the file with the name wubi-uninstall.bat in the same folder as your uninstaller
(Default is C:\ubuntu)

Double click the wubi-uninstall.bat batch file to uninstall.

Both these batch files are in the attached zip file.

-
@Agostino :

I tried adding

SetEnvironmentVariable("PYTHONCASEOK", NULL);

to pyrun.c and rebuilding, but it doesn't seem to work.

Adding "-E" to argv[] wouldn't be a good idea, as that would prevent all the other PYTHON* environment variables working :-)

Revision history for this message
Agostino Russo (ago) wrote :

Could you printout sys.path and os.environ within wubi? You can use log.debug within application.py

Revision history for this message
petebisson (o-launchpad-bisson-co-uk) wrote :

Hi again Ago,

With PYTHONCASEOK set, application.py fails on

from wubi.backends.win32 import WindowsBackend

The cause of this, as mentioned above is openpgp/sap/crypto.py ( line 47)

import Crypto.Util.number as NUM

Because python is running case insensitive search, the first match this gets for Crypto is actually crypto in the openpgp/sap directory. This means the module is actually trying :

import openpgp.sap.crypto.Util.number as NUM

with the results we have seen all along :

ImportError: No module named Util.number

You can investigate this further on your build machine by setting the environment variable:

export PYTHONCASEOK=1

Then when you 'make runbin' you will get exactly the same behaviour in wine.

Cheers,

Pete
-----

Extra info as requested.

# log extract (reformatted for clarity)
06-02 10:56 DEBUG root: ** extra info BEGIN **
06-02 10:56 DEBUG root: sys.path = [
    'C:\\u-904\\wubi',
    'C:\\IBMTOOLS\\utils\\support',
    'C:\\IBMTOOLS\\utils\\logger',
    'C:\\u-904\\wubi\\python23.zip',
    'C:\\u-904\\wubi\\DLLs',
    'C:\\u-904\\wubi\\lib',
    'C:\\u-904\\wubi\\lib\\plat-win',
    'C:\\u-904\\wubi\\lib\\lib-tk',
    'C:\\u-904\\wubi'
]

06-02 10:56 DEBUG root: os.environ = {
    'TMP': 'C:\\DOCUME~1\\Stacey\\LOCALS~1\\Temp',
    'COMPUTERNAME': 'THINKPAD',
    'USERDOMAIN': 'THINKPAD',
    'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files',
    'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 13 Stepping 8, GenuineIntel',
    'PROGRAMFILES': 'C:\\Program Files',
    'PROCESSOR_REVISION': '0d08',
    'SYSTEMROOT': 'C:\\WINDOWS',
    'PATH': 'C:\\PROGRAM FILES\\THINKPAD\\UTILITIES;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\Downloaded Program Files;C:\\IBMTOOLS\\Python22;C:\\Program Files\\PC-Doctor for Windows\\services;C:\\Program Files\\hpgs\\bin;C:\\Program Files\\OpenVPN\\bin;C:\\Program Files\\Nmap',
    'IBMSHARE': 'C:\\IBMSHARE',
    'TK_LIBRARY': 'C:\\IBMTOOLS\\Python22\\tcl\\tk8.4',
    'TEMP': 'C:\\DOCUME~1\\Stacey\\LOCALS~1\\Temp',
    'PROCESSOR_ARCHITECTURE': 'x86',
    'ALLUSERSPROFILE': 'C:\\Documents and Settings\\All Users',
    'SESSIONNAME': 'Console',
    'HOMEPATH': '\\Documents and Settings\\Stacey',
    'RRU': 'C:\\Program Files\\IBM\\IBM Rapid Restore Ultra\\',
    'USERNAME': 'Stacey',
    'LOGONSERVER': '\\\\THINKPAD',
    'PROMPT': '$P$G',
    'COMSPEC': 'C:\\WINDOWS\\system32\\cmd.exe',
    'PYTHONPATH': 'C:\\IBMTOOLS\\utils\\support;C:\\IBMTOOLS\\utils\\logger',
    'TCL_LIBRARY': 'C:\\IBMTOOLS\\Python22\\tcl\\tcl8.4',
    'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.pyo;.pyc;.py;.pyw',
    'CLIENTNAME': 'Console',
    'FP_NO_HOST_CHECK': 'NO',
    'WINDIR': 'C:\\WINDOWS',
    'APPDATA': 'C:\\Documents and Settings\\Stacey\\Application Data',
    'HOMEDRIVE': 'C:',
    'SYSTEMDRIVE': 'C:',
    'NUMBER_OF_PROCESSORS': '1',
    'PROCESSOR_LEVEL': '6',
    'OS': 'Windows_NT',
    'USERPROFILE': 'C:\\Documents and Settings\\Stacey'
}
06-02 10:56 DEBUG root: ** extra info END **

Agostino Russo (ago)
summary: - wubi-r129.exe does nothing.
+ wubi-r129.exe crashes when python 2.2 is preinstalled.
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/365501

tags: added: iso-testing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.