473,395 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

strange import error with Python-2.4.1

Whilst testing the excellent xlrd http://www.python.org/pypi/xlrd/0.3a1
I came across the following strangeness when trying to add an import of os to
assist with debugging/tracing.
At line 66 I replaced

import sys

with import sys, os

and then ran python runxlrd.py --help and got this error which is not a real
syntax problem

Traceback (most recent call last):
File "runxlrd.py", line 5, in ?
import xlrd
File "C:\python24\lib\site-packages\xlrd\__init__.py", line 552
if DEBUG: print >> self.logfile, "SST Processing"

if I remove the , os then the run produces the expected

usage: runxlrd.py [options] command input-file-patterns

options:
-h, --help show this help message and exit
-l LOGFILENAME, --logfilename=LOGFILENAME
contains error messages
-v VERBOSITY, --verbosity=VERBOSITY
level of information and diagnostics provided

I also am able to change the line to

import sys
import os

without error.

This behaviour doesn't occur with 2.4.2 or 2.4 only with 2.4.1. I looked for
some bug fix in the recently released 2.4.2 that related, but couldn't find
anything obvious. My system doesn't have psyco so xlrd's attempted psyco use
shouldn't be an issue. Thanks for 2.4.2, but is this one of the fixed bugs or
has it just got harder to induce?
--
Robin Becker

Oct 11 '05 #1
1 1583

"Robin Becker" <ro***@reportlab.com> wrote in message
news:ma*************************************@pytho n.org...
This behaviour doesn't occur with 2.4.2 or 2.4 only with 2.4.1. I looked for
some bug fix in the recently released 2.4.2 that related, but couldn't find
anything obvious.


One of the various codecs fixes, I think. Bug #1175396, perhaps.
Oct 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil | last post by:
Hi, I don't understand this strange behaviour: I compile this code : #include <Python.h> #include"Numeric/arrayobject.h" static PyObject *
4
by: Jay O'Connor | last post by:
I'm using Python 2.3 on windows and trying to use the win32 libs. I keep getting the following error >>> import win32gui Traceback (most recent call last): File "<pyshell#6>", line 1, in...
5
by: Colin Brown | last post by:
I have instances where Python 2.3.2 import both does not work or error. It can be demonstrated under Win2k and Linux by doing the following: 1. Create a subdirectory "abc" 2. In directory "abc"...
2
by: unexpected | last post by:
Hey guys, I'm having problems importing a file into my python app. Everytime I try to define the object specified by this file, i.e, test = Test(), It raises an ImportError exception:...
2
by: dwelch91 | last post by:
Hi, c.l.p.'ers- I am having a problem with the import of xml.parsers.expat that has gotten me completely stumped. I have two programs, one a PyQt program and one a command line (text) program...
6
by: robert | last post by:
I get python crashes and (in better cases) strange Python exceptions when (in most cases) importing and using cookielib lazy on demand in a thread. It is mainly with cookielib, but remember the...
10
by: hg | last post by:
Hi, I'v been facing some very strange errors lately: one example: def __init__(self): ..... import my_info some_text = my_info.T_SOME_TEXT
2
by: Spes | last post by:
Hi, I have this simple code: | #!/usr/bin/python | import codecs | import re | from copy import deepcopy | | class MyClass(object): | def __del__(self):
8
by: Dox33 | last post by:
I ran into a very strange behaviour of raw_input(). I hope somebody can tell me how to fix this. (Or is this a problem in the python source?) I will explain the problem by using 3 examples....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.