×

Discussion Board

Results 1 to 5 of 5

Thread: import error

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    19

    import error

    Hi, I've got Python runtime 1.9.7 and ScriptShell 1.9.7. I run app that uses shelve. Under ScriptShell works fine, but as standalone (SIS) throws exception:

    ImportError: no dbm clone found, tried [ "dbhash", "gdbm", "dbm", "dumbdbm" ]

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: import error

    Quote Originally Posted by diverman View Post
    Hi, I've got Python runtime 1.9.7 and ScriptShell 1.9.7. I run app that uses shelve. Under ScriptShell works fine, but as standalone (SIS) throws exception:

    ImportError: no dbm clone found, tried [ "dbhash", "gdbm", "dbm", "dumbdbm" ]
    hello diverman

    may be they are extramodules which need to be deployed exterenly, just a wid guess i am not sure.

    PS: Explain your problem in a detailed manner to get good quality answers.

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    19

    Re: import error

    Thanks. Nokia 6220. I use "shelve", which is python standard module. see http://docs.python.org/library/shelve.html

    1) App works fine under ScriptShell 1.9.7 and Python runtime 1.9.7.

    2) App does not work as standalone with Python runtime 1.9.7. It throws:

    STANDALONE Python runtime 1.9.7:

    import shelve
    aaa = shelve.open("e:\aaa")

    ImportError: no dbm clone found, tried [ "dbhash", "gdbm", "dbm", "dumbdbm" ]

    3) With ScriptShell 2.0.0 and Runtime 2.0.0

    File e:\python\myapp.py, line 28, in <module>
    aaa = shelve.open("e:\aaa")
    File c:\resource\scriptshell_dir_043026\shelve.py, line 225, in open
    File c:\resource\scriptshell_dir_043026\shelve.py, line 208, in __init__
    File c:\resource\python25\python25.zip \site.py, line 86, in platsec_import
    return _original_import(name, globals, locals, fromlist, level)
    File c:\resource\scriptshell_dir_043026\anydbm.py, line 49, in <module>
    File c:\resource\scriptshell_dir_043026\site.py, line 109, in platsec_import
    raise ImportErrorNo("No module named" + name)
    ImportError: no module named dbhash

  4. #4
    Registered User
    Join Date
    Feb 2010
    Posts
    19

    Re: import error

    I don't uderstand, whats difference between running under ScriptShell and standalone, there are two different set of modules?

    ScriptShell: shelve "ok"
    Standalone: shelve bad

  5. #5
    Registered User
    Join Date
    Feb 2010
    Posts
    19

    Re: import error

    SOLVED.

    Replacing shelve with e32dbm solved my problem. But thats not ideal, because e32dbm doesn't allow other data types than strings. :-/

Similar Threads

  1. How to manage Access Point for qt?
    By KimWonChol in forum [Archived] Qt SDKs and Tools
    Replies: 1
    Last Post: 2010-01-22, 18:23
  2. error LNK2019: unresolved external symbol ???
    By wgarnett in forum Symbian C++
    Replies: 3
    Last Post: 2009-09-28, 06:53
  3. Error in buliding a j2me project
    By siyamudheen in forum Bluetooth Technology
    Replies: 3
    Last Post: 2009-05-11, 06:28
  4. My BuilderX (with S60 SDK 2.1.NET MS version) cannot build ARMI UREL
    By danielvidonyi@hotmail.com in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-05-04, 21:30
  5. error LNK2001: Please Help
    By sourish_khan in forum Symbian C++
    Replies: 9
    Last Post: 2006-04-19, 11:16

Posting Permissions

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