×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Missing modules when using ensymble to create sis file (Python 1.9.4)

    Hello !

    I have tried a lot to create my sis file but I couldn't. I am receiving several logs related to missing módules but I dont know how to include them.
    I need some help. What I did until now:

    1) First, I tried to use my old script (it used to work with python 1.9.2). My code is located at src and I have a default.py.

    Code:
    @echo off
    
    REM %1 is the version number, like 1.4.2
    IF "%1" EQU "" GOTO error
    
    SET PYTHON=C:\Python25\python.exe
    SET APPNAME=Wordmobi
    SET CAPBLS=NetworkServices+LocalServices+ReadUserData+WriteUserData+UserEnvironment
    SET SRCDIR=src
    SET TXTFILE=README
    SET TMPDIR=src.tmp
    SET ICON=wordmobi.svg
    
    SET OPTS=--verbose --version="%1" --appname="%APPNAME%"  ^
             --textfile="%TXTFILE%" --icon="%ICON%" ^
             --caps="%CAPBLS%" "%TMPDIR%"
         
    echo "Generating for Python 1.9.2..."
    rmdir /s /q %TMPDIR%
    mkdir %TMPDIR%\extras\data\python
    copy  %SRCDIR%\*.py  %TMPDIR%\extras\data\python
    move %TMPDIR%\extras\data\python\default.py  %TMPDIR%\
    
    %PYTHON% ensymble.py py2sis %OPTS% --extrasdir=extras --heapsize=4k,5M "%APPNAME%-%1-py19.sis"
    
    goto end
    
    :error
    echo Sintaxe: %0 version
    
    :end
    default.py is below:

    Code:
    import e32
    import sys
    if float(e32.pys60_version[:3]) >= 1.9:
        sys.path.append("c:\\data\\python")
    
    import wordmobi
    
    wordmobi.WordMobi().run()
    2) I tried to use ensymble_gui.pyw, specifying just my src directory, but sis can not be generated.

    In both cases, there are warning in the screen related to missing modules (below). Sis is generate and may be installed but it does not work (we have missing modules).

    Code:
    WARNING: Dependent module 'tty' not found
    WARNING: Dependent module '_sha512' not found
    WARNING: Dependent module 'aifc' not found
    WARNING: Dependent module 'whichdb' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'sgmllib' not found
    WARNING: Dependent module 'pprint' not found
    WARNING: Dependent module 'unittest' not found
    WARNING: Dependent module 'compiler' not found
    WARNING: Dependent module 'SocketServer' not found
    WARNING: Dependent module 'repr' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module '_lsprof' not found
    WARNING: Dependent module 'compiler' not found
    WARNING: Dependent module '_MozillaCookieJar' not found
    WARNING: Dependent module 'bisect' not found
    WARNING: Dependent module 'cmd' not found
    WARNING: Dependent module 'compiler' not found
    WARNING: Dependent module 'pydoc' not found
    WARNING: Dependent module 'sha' not found
    WARNING: Dependent module 'token' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'shlex' not found
    WARNING: Dependent module 'dummy_threading' not found
    WARNING: Dependent module 'dis' not found
    WARNING: Dependent module 'fcntl' not found
    WARNING: Dependent module 'asyncore' not found
    WARNING: Dependent module 'locale' not found
    WARNING: Dependent module 'chunk' not found
    WARNING: Dependent module 'popen2' not found
    WARNING: Dependent module 'compiler' not found
    WARNING: Dependent module 'BaseHTTPServer' not found
    WARNING: Dependent module 'calendar' not found
    WARNING: Dependent module 'bdb' not found
    WARNING: Dependent module 'py_compile' not found
    WARNING: Dependent module 'new' not found
    WARNING: Dependent module 'formatter' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'cgi' not found
    WARNING: Dependent module 'optparse' not found
    WARNING: Dependent module 'inspect' not found
    WARNING: Dependent module 'fnmatch' not found
    WARNING: Dependent module 'md5' not found
    WARNING: Dependent module '_locale' not found
    WARNING: Dependent module 'logging' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'compiler' not found
    WARNING: Dependent module 'opcode' not found
    WARNING: Dependent module 'doctest' not found
    WARNING: Dependent module 'pstats' not found
    WARNING: Dependent module 'pdb' not found
    WARNING: Dependent module 'base64' not found
    WARNING: Dependent module 'sensor_defs' not found
    WARNING: Dependent module 'dummy_thread' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module '_LWPCookieJar' not found
    WARNING: Dependent module 'pkgutil' not found
    WARNING: Dependent module 'binascii' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'symbol' not found
    WARNING: Dependent module '_sha256' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'Cookie' not found
    WARNING: Dependent module 'tokenize' not found
    WARNING: Dependent module 'compiler' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'compiler' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'unicodedata' not found
    WARNING: Dependent module 'anydbm' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'uu' not found
    WARNING: Dependent module '_csv' not found
    WARNING: Dependent module 'markupbase' not found
    WARNING: Dependent module 'multifile' not found
    WARNING: Dependent module 'mimetools' not found
    WARNING: Dependent module 'parser' not found
    WARNING: Dependent module 'compiler' not found
    WARNING: Dependent module 'shutil' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'symtable' not found
    WARNING: Dependent module 'compiler' not found
    WARNING: Dependent module 'gettext' not found
    WARNING: Dependent module '_ssl' not found
    WARNING: Dependent module 'rfc822' not found
    WARNING: Dependent module 'glob' not found
    WARNING: Dependent module 'textwrap' not found
    WARNING: Dependent module 'codeop' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module 'compiler' not found
    WARNING: Dependent module 'email' not found
    WARNING: Dependent module '_symtable' not found
    WARNING: Dependent module 'difflib' not found
    WARNING: Dependent module 'compiler' not found
    WARNING: Dependent module 'htmllib' not found
    WARNING: Dependent module 'gzip' not found
    WARNING: Dependent module 'hmac' not found
    I have already read the release notes for 1.9.4, where the statement "We'll improve the Ensymble packaging tool to automatically bundle modules not included in the base runtime into your application SIS, as well as specify how a module author can distribute their module to other developers so that the module can be easily used." say something about this but I am certainly missing something.

    Any tips ?

    Marcelo Barros
    Last edited by marcelobarrosalmeida; 2009-05-24 at 18:26.

  2. #2
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: Missing modules when using ensymble to create sis file (Python 1.9.4)

    Following this thread:
    Mmmh, I just remember: there was some issue when using pre-compiled modules;
    The new module flow does not recognize the used sub-modules from that. Therefore I am always putting in one dummy module (uncompiled), which just lists all the modules that are somewhere imported.
    I tried to create a dummy.py with all module cited as missing but final sis does not run.

    Marcelo Barros

  3. #3
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: How to create a sis using ensymble and Python 1.9.4 ?

    Hi Marcelo,

    How about to ckeck ensymble sources ?

    I can not say exactly what is happening but it is related to modules search inside <python s60 1.9.4 install dir>\module-repo.

    After checking src\py2sis\ensymble\module_repo.py I had some insights:

    Code:
    module_repo_dir = os.path.abspath('module-repo')
    std_modules_dir = os.path.join(module_repo_dir, 'standard-modules')
    dev_modules_dir = os.path.join(module_repo_dir, 'dev-modules')
    ...
    def search_module(modules):
        dep_module_paths = []
        if not os.path.exists(dev_modules_dir) or \
                                                not os.path.exists(std_modules_dir):
            raise RuntimeError("Module Dependency folder does not exist")
    
        std_module_paths = [os.path.join(std_modules_dir, filename) \
                            for filename in os.listdir(std_modules_dir)]
    ...
        for module_name in modules:
    ...
            # Search in standard-modules repo directory. Remove the file extension
            # and check if the module is present
            if os.path.normcase(module_name) in \
                      [os.path.normcase(os.path.basename(std_module.split('.')[0]).split(prefix)[-1])
                                             for std_module in std_module_paths]:
                debug_print("Dep module %s found in Std. Library" % module_name)
    ...
    I copied module-repo dir to the level where my script is located and it was possible to generate the sis (I had a local copy of ensymble.py as well). But I can not understand why the generation do not work with ensymble GUI. My Python for S60 1.9.4 is installed on d:\S60.

    Marcelo Barros

    PS: I felt alone in this thread

  4. #4
    Registered User
    Join Date
    May 2007
    Posts
    25

    Re: How to create a sis using ensymble and Python 1.9.4 ?

    Hi Marcelo,

    I had to fiddle a bit to work out how to use ensymble (on linux) as well. Not sure if they help, but here are my notes:

    http://baach.de/Members/jhb/pys60/de...n-for-s60/view

    Cheers,

    Joerg

  5. #5
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: How to create a sis using ensymble and Python 1.9.4 ?

    Quote Originally Posted by jhb View Post
    Hi Marcelo,

    I had to fiddle a bit to work out how to use ensymble (on linux) as well. Not sure if they help, but here are my notes:

    http://baach.de/Members/jhb/pys60/de...n-for-s60/view

    Thanks, Joerg. They are useful, for sure. Even more after I understood the origins of the problem.

    Good tips for bluetooth console as well !

    Marcelo

  6. #6
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    114

    Re: Missing modules when using ensymble to create sis file (Python 1.9.4)

    Quote Originally Posted by marcelobarrosalmeida View Post

    2) I tried to use ensymble_gui.pyw, specifying just my src directory, but sis can not be generated.

    In both cases, there are warning in the screen related to missing modules (below). Sis is generate and may be installed but it does not work (we have missing modules).

    Any tips ?

    Marcelo Barros
    Even though it has started working for you after moving module-repo, we would like to take a look at the problem why it didn't work in the first place. Could you please reproduce the scenario when it didn't work and file a bug attaching the debug.txt that is generated in the PythonForS60 folder?

    Thank you.
    import antigravity

  7. #7
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: Missing modules when using ensymble to create sis file (Python 1.9.4)

    Quote Originally Posted by ashwinurao View Post
    Even though it has started working for you after moving module-repo, we would like to take a look at the problem why it didn't work in the first place. Could you please reproduce the scenario when it didn't work and file a bug attaching the debug.txt that is generated in the PythonForS60 folder?

    Thank you.
    Of course, ashwinurao. I will do it right now.

    Marcelo

  8. #8
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: Missing modules when using ensymble to create sis file (Python 1.9.4)

    Quote Originally Posted by marcelobarrosalmeida View Post
    Of course, ashwinurao. I will do it right now.

    Marcelo

    Link to this issue is here, at Maemo.

  9. #9
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: Missing modules when using ensymble to create sis file (Python 1.9.4)

    Hi

    I think I found the "root" of this problem: PATHS WITH DOTS !
    I was using "d:\s60\python1.9.4" as install dir for PyS60 so I copy all modules to my project dir and generated the sis. But, when I changed my project dir to something with dots in the path, the error started to happen again.

    Marcelo

  10. #10
    Nokia Developer Expert
    Join Date
    Apr 2007
    Posts
    131

    Re: Missing modules when using ensymble to create sis file (Python 1.9.4)

    Quote Originally Posted by marcelobarrosalmeida View Post
    Hi

    I think I found the "root" of this problem: PATHS WITH DOTS !
    I was using "d:\s60\python1.9.4" as install dir for PyS60 so I copy all modules to my project dir and generated the sis. But, when I changed my project dir to something with dots in the path, the error started to happen again.

    Marcelo
    Can you please check this with PyS60 1.9.5 release? This should be fixed now.

  11. #11
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: Missing modules when using ensymble to create sis file (Python 1.9.4)

    Quote Originally Posted by mahesh.sayibabu View Post
    Can you please check this with PyS60 1.9.5 release? This should be fixed now.

    Tested. Fixed in 1.9.5 (My favorite version !)

    Marcelo

Similar Threads

  1. Python for S60 1.9.4 is now released
    By tvijayan in forum Symbian
    Replies: 9
    Last Post: 2009-05-27, 10:39
  2. An issue with ensymble and Python 1.9.4
    By sptkrishnan in forum Symbian
    Replies: 7
    Last Post: 2009-05-26, 05:13
  3. Python for S60 1.9.3 released
    By tvijayan in forum Symbian
    Replies: 40
    Last Post: 2009-04-03, 15:00
  4. Python for S60 1.9.1 released
    By tvijayan in forum Symbian
    Replies: 30
    Last Post: 2009-02-26, 06:16
  5. Python for S60 1.9.0 released
    By tvijayan in forum Symbian
    Replies: 48
    Last Post: 2009-01-27, 15:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×