Discussion Board

Results 1 to 3 of 3

Thread: import problem

  1. #1
    Regular Contributor
    Join Date
    Jul 2009

    import problem

    I just got a C6 and installed pys60 2 on it. I'm trying to run something that ran fine on my e63. It's getting error messages about not being able to find a module, even though that module is in the path.

    Here's the problem run from the console on the phone. As you can see, the module is in sys.path. I've tried different capitalizations, with no effect.

    >>> import sys
    >>> sys.path
    'c:\\resource\\python25\\python25.zip', 'c:\\resource\\python25',
    >>> import listbox3
    Traceback (most recent call last):
    File "<console>", line 1, in <module>
    File "c:\resource\python25\python25.zip\site.py", line 109, in platsec_import
    raise ImportError("No module named " + name)
    ImportError: No module named listbox3
    >>> import os
    >>> os.listdir('e:/python/lib')

    I'm probably missing something simple, but what?

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Deva, Romania

    Re: import problem

    You have to write the name of the module in the same case as the name of the file. So try import LISTBOX3.PY (or rename it to listbox3.py - lowercase).

  3. #3
    Regular Contributor
    Join Date
    Jul 2009

    Re: import problem

    That doesn't help. As I mentioned, I've tried different capitalizations for the file, with no effect.

    However, I tried removing the e:\python\lib directory and recreating it in python, then copying the files back into it. For some reason, that worked.

Similar Threads

  1. Vcard import problem
    By maarten2002 in forum Symbian
    Replies: 2
    Last Post: 2009-02-02, 12:13
  2. SOAPpy import problem
    By sop3k in forum Symbian
    Replies: 6
    Last Post: 2008-12-29, 15:27
  3. Carbide 1.1 import problem
    By scalado-bjorna in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2007-04-05, 09:19
  4. mmp import problem
    By mmc18 in forum Symbian
    Replies: 1
    Last Post: 2006-01-28, 11:59
  5. Replies: 0
    Last Post: 2005-10-28, 10:25

Posting Permissions

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