471,066 Members | 2,235 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 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 1531

"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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Phil | last post: by
4 posts views Thread by Jay O'Connor | last post: by
5 posts views Thread by Colin Brown | last post: by
2 posts views Thread by unexpected | last post: by
2 posts views Thread by dwelch91 | last post: by
10 posts views Thread by hg | last post: by
2 posts views Thread by Spes | last post: by
8 posts views Thread by Dox33 | last post: by

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.