×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    43

    Import from e:\Python fails on lowercase named files

    When I copy a file named with only lowercase characters into e:\Python, python can't import it and throws a "No module named..." error. I'm adding the path to sys.path so that's not the case.


    If I enter the Run Script option at the shell, I see the file will be listed as all uppercase characters. This also happened in 1.4.5 but 1.9.5 is case sensitive and thus has exposed the issue. Examples:


    As seen by Windows As seen by PyS60

    sms.py ------------- SMS.PY

    sms1.py ------------- sms1.py

    Datalayer.py ------- Datalayer.py



    This bug is somehow described in bug report 3284 at maemo. I don't think it should be closed. Here's the link:

    https://garage.maemo.org/tracker/ind...=854&atid=3201


    The proposed workaround there is to rename the files and it's working for me too. In my case, for example:


    os.rename("e:\\Python\\sms.py", "e:\\Python\\sms.py")



    Thanks.
    Last edited by carlosl; 2009-06-19 at 23:04. Reason: I was using incorrect bug number and link.

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

    Re: Import from e:\Python fails on lowercase named files

    This bug re-opened and it will be investigated further.

  3. #3
    Registered User
    Join Date
    Aug 2007
    Posts
    8

    Re: Import from e:\Python fails on lowercase named files

    Quote Originally Posted by carlosl View Post
    When I copy a file named with only lowercase characters into e:\Python, python can't import it and throws a "No module named..." error. I'm adding the path to sys.path so that's not the case.


    If I enter the Run Script option at the shell, I see the file will be listed as all uppercase characters. This also happened in 1.4.5 but 1.9.5 is case sensitive and thus has exposed the issue. Examples:


    As seen by Windows As seen by PyS60

    sms.py ------------- SMS.PY

    sms1.py ------------- sms1.py

    Datalayer.py ------- Datalayer.py



    This bug is somehow described in bug report 3284 at maemo. I don't think it should be closed. Here's the link:

    https://garage.maemo.org/tracker/ind...=854&atid=3201


    The proposed workaround there is to rename the files and it's working for me too. In my case, for example:


    os.rename("e:\\Python\\sms.py", "e:\\Python\\sms.py")



    Thanks.

    Followup

    https://garage.maemo.org/tracker/?fu...4&group_id=854

Similar Threads

  1. JXME + OSGi for j2me
    By gittu in forum Mobile Java General
    Replies: 13
    Last Post: 2009-03-04, 09:34
  2. Import Project From .mmp File fails...
    By jojala2 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 5
    Last Post: 2007-03-02, 01:53
  3. Import Project Fails
    By amitaggarwal in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2004-12-13, 12:08
  4. Data Import from Palm fails for Nokia 3650
    By sriraju in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2003-06-04, 23:40

Posting Permissions

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