Running ensymble gives TypeError: import_module() takes at most 5 arguments (6 given)

Bug #448665 reported by Prateek Karandikar
94
This bug affects 15 people
Affects Status Importance Assigned to Milestone
ensymble (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: ensymble

Running ensymble with no arguments results in

$ ensymble
Traceback (most recent call last):
  File "/usr/bin/ensymble", line 1038, in <module>
    import cmdmain
  File "/usr/lib/python2.6/ihooks.py", line 406, in import_module
    q, tail = self.find_head_package(parent, str(name))
  File "/usr/lib/python2.6/ihooks.py", line 442, in find_head_package
    q = self.import_it(head, qname, parent)
  File "/usr/lib/python2.6/ihooks.py", line 497, in import_it
    m = self.loader.load_module(fqname, stuff)
  File "<package>", line 28, in load_module
  File "cmdmain.py", line 34, in <module>
  File "/usr/lib/python2.6/ihooks.py", line 406, in import_module
    q, tail = self.find_head_package(parent, str(name))
  File "/usr/lib/python2.6/ihooks.py", line 442, in find_head_package
    q = self.import_it(head, qname, parent)
  File "/usr/lib/python2.6/ihooks.py", line 497, in import_it
    m = self.loader.load_module(fqname, stuff)
  File "<package>", line 28, in load_module
  File "cmd_py2sis.py", line 33, in <module>
  File "/usr/lib/python2.6/ihooks.py", line 406, in import_module
    q, tail = self.find_head_package(parent, str(name))
  File "/usr/lib/python2.6/ihooks.py", line 442, in find_head_package
    q = self.import_it(head, qname, parent)
  File "/usr/lib/python2.6/ihooks.py", line 497, in import_it
    m = self.loader.load_module(fqname, stuff)
  File "<package>", line 28, in load_module
  File "sisfile.py", line 28, in <module>
  File "/usr/lib/python2.6/ihooks.py", line 406, in import_module
    q, tail = self.find_head_package(parent, str(name))
  File "/usr/lib/python2.6/ihooks.py", line 442, in find_head_package
    q = self.import_it(head, qname, parent)
  File "/usr/lib/python2.6/ihooks.py", line 497, in import_it
    m = self.loader.load_module(fqname, stuff)
  File "<package>", line 22, in load_module
  File "/usr/lib/python2.6/ihooks.py", line 272, in load_module
    m = self.hooks.load_source(name, filename, file)
  File "/usr/lib/python2.6/ihooks.py", line 170, in load_source
    return imp.load_source(name, filename, file)
  File "/usr/lib/python2.6/sha.py", line 8, in <module>
    DeprecationWarning, 2)
TypeError: import_module() takes at most 5 arguments (6 given)

Expected behaviour:
It should print some help/documentation or other meaningful message.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: ensymble 0.27-1ubuntu1
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_IN
 SHELL=/bin/bash
SourcePackage: ensymble
Uname: Linux 2.6.28-15-generic i686

Revision history for this message
Prateek Karandikar (prateek.karandikar) wrote :
Revision history for this message
Leonid Shevtsov (leonid) wrote :

Actually it occurs with normal parameters, too, e.g. 'ensymble py2sis file.py' generates the same error.

It seems to be some incompatibility between Python 2.5 and 2.6, since there is no error when ensymble is built from source and executed with python2.5.

Revision history for this message
COLIN Stéphane (bigbob-fun) wrote :

Hi all,

Same problem here, I can use ensymble anymore since upgrade to Karmic

A++

Revision history for this message
datenteiler (datenteiler) wrote :

Hi,

same problem here in Karmic. I know that ensymble needs Python 2.5. Karmic is shipped with Python 2.6 but also contains 2.5. So I tried to start ensymble with Python 2.5 but it failed, too:

$ python2.5 /usr/bin/ensymble
Traceback (most recent call last):
  File "/usr/bin/ensymble", line 5, in <module>
    if imp.get_magic()!='\xd1\xf2\r\n':raise RuntimeError,s
RuntimeError: requires python 2.6.2+ or bytecode compatible

That's my workaround:

I've downloaded ensymble_python2.5-0.28.py

wget http://ensymble.googlecode.com/files/ensymble_python2.5-0.28.py

and copied it to ~/bin

Now I can start it with:

$ python2.5 ensymble_python2.5-0.28.py

Ensymble developer utilities for Symbian OS

usage: ensymble_python2.5-0.28.py command [command options]...

Commands:
    altere32 Alter the IDs and capabilities of e32image files (EXEs, DLLs)
    genuid Generate a new test-range UID from a name
    infoe32 Show the IDs and capabilities of e32image files (EXEs, DLLs)
    mergesis Merge several SIS packages into one
    py2sis Create a SIS package for a "Python for S60" application
    signsis Sign a SIS package
    simplesis Create a SIS package from a directory structure
    version Print Ensymble version

Use 'ensymble_python2.5-0.28.py command --help' to get command specific help.

Regards
Christian

Revision history for this message
sanz (wangling-letterbox) wrote :

same situation here on Ubuntu9.10.
the workaround above works.

Revision history for this message
Benedikt Kristinsson (benedikt-k) wrote :

This affects me too.

I propose that ensymble_python2.5-0.28.py will be used in apt, with python 2.5 as a dependency. (the #! should point to /usr/bin/python2.5 )

Changed in ensymble (Ubuntu):
status: New → Confirmed
Revision history for this message
simon (simon.nix) wrote :

Here's a quick fix which changes the version of python called in the build and execution to be hardcoded to 2.5. I don't know how to change the dependencies.

tags: added: patch
Revision history for this message
Anthony Batchelor (toeknee) wrote :

Python 2.5 no longer available... :(

Revision history for this message
COLIN Stéphane (bigbob-fun) wrote :

Ok, since lucid, ensymble can't run properly anymore :

bigbob@bigbob-laptop:~$ ensymble
Traceback (most recent call last):
  File "/usr/bin/ensymble", line 1059, in <module>
    import cmdmain
  File "/usr/lib/python2.6/ihooks.py", line 406, in import_module
    q, tail = self.find_head_package(parent, str(name))
  File "/usr/lib/python2.6/ihooks.py", line 442, in find_head_package
    q = self.import_it(head, qname, parent)
  File "/usr/lib/python2.6/ihooks.py", line 497, in import_it
    m = self.loader.load_module(fqname, stuff)
  File "<package>", line 28, in load_module
  File "cmdmain.py", line 34, in <module>
  File "/usr/lib/python2.6/ihooks.py", line 406, in import_module
    q, tail = self.find_head_package(parent, str(name))
  File "/usr/lib/python2.6/ihooks.py", line 442, in find_head_package
    q = self.import_it(head, qname, parent)
  File "/usr/lib/python2.6/ihooks.py", line 497, in import_it
    m = self.loader.load_module(fqname, stuff)
  File "<package>", line 28, in load_module
  File "cmd_py2sis.py", line 33, in <module>
  File "/usr/lib/python2.6/ihooks.py", line 406, in import_module
    q, tail = self.find_head_package(parent, str(name))
  File "/usr/lib/python2.6/ihooks.py", line 442, in find_head_package
    q = self.import_it(head, qname, parent)
  File "/usr/lib/python2.6/ihooks.py", line 497, in import_it
    m = self.loader.load_module(fqname, stuff)
  File "<package>", line 28, in load_module
  File "sisfile.py", line 28, in <module>
  File "/usr/lib/python2.6/ihooks.py", line 406, in import_module
    q, tail = self.find_head_package(parent, str(name))
  File "/usr/lib/python2.6/ihooks.py", line 442, in find_head_package
    q = self.import_it(head, qname, parent)
  File "/usr/lib/python2.6/ihooks.py", line 497, in import_it
    m = self.loader.load_module(fqname, stuff)
  File "<package>", line 22, in load_module
  File "/usr/lib/python2.6/ihooks.py", line 272, in load_module
    m = self.hooks.load_source(name, filename, file)
  File "/usr/lib/python2.6/ihooks.py", line 170, in load_source
    return imp.load_source(name, filename, file)
  File "/usr/lib/python2.6/sha.py", line 8, in <module>
    DeprecationWarning, 2)
TypeError: import_module() takes at most 5 arguments (6 given)

It look like I have find someone talking about a possible fix, permitting to use ensymble with python 2.6 without revert back to python 2.5.

BTW, I'm not sure to understand corectly the informations the guy explain :

http://www.forum.nokia.com/forum/showthread.php?t=191010

Can someone have a look and fix in a new release ???

Hope it help ...

A++

Revision history for this message
COLIN Stéphane (bigbob-fun) wrote :

News !!!

It seem version 0.29 of ensymble just come out :

http://code.google.com/p/ensymble/downloads/list

Also, reading the changelog, it apear :

Log message

Reorganization, distutil packaging & update to 2.6

- Moved things around to create ensymble package, with actions/ and utils/ sub-
packages.
- Took care of deprecation warnings (sha => hashlib, os.popen => subprocess)
- Added setup.py and made changes to commandline ensymble script
- Added MANIFEST to include COPYING and TODO to the source distribution
Distutil-ize ensymble

Now, may I ask a developer to update the package ensymble ???

A++

Revision history for this message
COLIN Stéphane (bigbob-fun) wrote :

So ???

No package maintainer reading this bug ?

A++

Revision history for this message
COLIN Stéphane (bigbob-fun) wrote :

Why we log bugs ?

Is there someone who care about our bug report or not ?

A++

Revision history for this message
COLIN Stéphane (bigbob-fun) wrote :

New informations :

- Ok, ensymble 0.29 doesn't seem to cry about 'TypeError: etc ...'
- But the problem now seem to be related to a new version of openssl.
- Activating the --debug flag report :

DEBUG: Popen(('/usr/bin/openssl', 'rsa -in /tmp/ensymble-poxtcp/keyin.pem -out /tmp/ensymble-poxtcp/keyout.pem -passin stdin'))
DEBUG: pipeerr.read() = "openssl:Error: 'rsa -in /tmp/ensymble-poxtcp/keyin.pem -out /tmp/ensymble-poxtcp/keyout.pem -passin stdin' is an invalid command.\n\nStandard commands\nasn1parse ca ciphers crl crl2pkcs7 \ndgst dh dhparam dsa dsaparam \nec ecparam enc engine errstr \ngendh gendsa genrsa nseq ocsp \npasswd pkcs12 pkcs7 pkcs8 prime \nrand req rsa rsautl s_client \ns_server s_time sess_id smime speed \nspkac verify version x509 \n\nMessage Digest commands (see the `dgst' command for more details)\nmd2 md4 md5 rmd160 sha \nsha1 \n\nCipher commands (see the `enc' command for more details)\naes-128-cbc aes-128-ecb aes-192-cbc aes-192-ecb aes-256-cbc \naes-256-ecb base64 bf bf-cbc bf-cfb \nbf-ecb bf-ofb cast cast-cbc cast5-cbc \ncast5-cfb cast5-ecb cast5-ofb des des-cbc \ndes-cfb des-ecb des-ede des-ede-cbc des-ede-cfb \ndes-ede-ofb des-ede3 des-ede3-cbc des-ede3-cfb des-ede3-ofb \ndes-ofb des3 desx rc2 rc2-40-cbc \nrc2-64-cbc rc2-cbc rc2-cfb rc2-ecb rc2-ofb \nrc4 rc4-40 \n\n"
Traceback (most recent call last):
  File "/home/bigbob/Vrac/Testing/ensymble-0.29/ensymble.py", line 93, in <module>
    sys.exit(main())
  File "/home/bigbob/Vrac/Testing/ensymble-0.29/ensymble.py", line 80, in main
    cmddict[command].run(pgmname, sys.argv[2:])
  File "/home/bigbob/Vrac/Testing/ensymble-0.29/ensymble/actions/signsis.py", line 337, in run
    signature, algoid = sisfile.signstring(privkeydata, passphrase, string)
  File "/home/bigbob/Vrac/Testing/ensymble-0.29/ensymble/utils/sisfile.py", line 88, in signstring
    signature, keytype = cryptutil.signstring(privkey, passphrase, string)
  File "/home/bigbob/Vrac/Testing/ensymble-0.29/ensymble/utils/cryptutil.py", line 90, in signstring
    privkey, keytype = decryptkey(tempdir, privkey, passphrase)
  File "/home/bigbob/Vrac/Testing/ensymble-0.29/ensymble/utils/cryptutil.py", line 304, in decryptkey
    raise ValueError("wrong pass phrase or invalid private key")
ValueError: wrong pass phrase or invalid private key

The openssl package version I use is : openssl 0.9.8k-7ubuntu8

Hope it help ...

A++

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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