[Python-bugs-list] [ python-Bugs-440017 ] SystemError when importing packages
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 10 Jul 2001 12:22:57 -0700
Bugs item #440017, was opened at 2001-07-10 04:53
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=440017&group_id=5470
Category: Python Interpreter Core
Group: Platform-specific
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: M.-A. Lemburg (lemburg)
Assigned to: Tim Peters (tim_one)
Summary: SystemError when importing packages
Initial Comment:
Python 2.1 (haven't checked older versions) on Windows has a problem with importing packages with a
case mismatch in the name, e.g. trying to import the package "encodings" using the name "Encodings"
gives you the following error:
>>> import Encodings
Traceback (most recent call last):
File "<pyshell#1>", line 1, in ?
import Encodings
SystemError: NULL result without error in call_object
>>>
It should ideally output:
ImportError: No module named Encodings (case-mismatch)
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2001-07-10 12:22
Message:
Logged In: YES
user_id=31435
I confirmed this is fixed in 2.1.1:
C:\Code\2.1.1\dist\src\PCbuild>python
Python 2.1.1c1 (#19, Jul 10 2001, 14:55:28) [MSC 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license" for more
information.
>>> import Encodings
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named Encodings
>>>
It doesn't have a "(case-mismatch)" thingie in the
exception detail, not any more than "import Math"
or "import SYS" do. These msgs-- like the import rules --
are platform-independent now.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2001-07-10 10:34
Message:
Logged In: YES
user_id=31435
Works for me under current CVS. Likely fixed along with
one of these other bugs:
438295: [Windows] __init__.py cause strange behavior
417093: Case sensitive import: dir and .py file w/ same name
You should check 2.1.1 when it comes out (this Friday?) to
make sure it's fixed there too ...
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=440017&group_id=5470