Da ich noch ziemlich am Anfang mit Python stehe, kann ich aus folgender Fehlermeldung nicht sonderlich viel ableiten....
Meine Umgebung:
Ubuntu 8.10
Python 2.5
Den code den ich im script ausführe
Code: Alles auswählen
import optparse
Code: Alles auswählen
python2.5 test.py
fii10.0
Traceback (most recent call last):
File "test.py", line 1, in <module>
import optparse
File "/usr/lib/python2.5/optparse.py", line 71, in <module>
import textwrap
File "/usr/lib/python2.5/textwrap.py", line 32, in <module>
class TextWrapper:
File "/usr/lib/python2.5/textwrap.py", line 68, in TextWrapper
whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace))
AttributeError: 'module' object has no attribute 'maketrans'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 38, in apport_excepthook
from apport.packaging_impl import impl as packaging
File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in <module>
from apport.report import Report
File "/usr/lib/python2.5/site-packages/apport/report.py", line 20, in <module>
from problem_report import ProblemReport
File "/usr/lib/python2.5/site-packages/problem_report.py", line 17, in <module>
from email.Encoders import encode_base64
File "/usr/lib/python2.5/email/__init__.py", line 113, in <module>
lower_map = string.maketrans(string.ascii_uppercase, string.ascii_lowercase)
AttributeError: 'module' object has no attribute 'maketrans'
Original exception was:
Traceback (most recent call last):
File "test.py", line 1, in <module>
import optparse
File "/usr/lib/python2.5/optparse.py", line 71, in <module>
import textwrap
File "/usr/lib/python2.5/textwrap.py", line 32, in <module>
class TextWrapper:
File "/usr/lib/python2.5/textwrap.py", line 68, in TextWrapper
whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace))
AttributeError: 'module' object has no attribute 'maketrans'
Interessanterweise trat das Problem nicht von Anfang an auf...
Im Netz habe ich einiges ähnliches gefunden, jedoch keine Lösung...??
Ich hoffe ich stolpere über einen absoluten Anfägerfehler!!
Gruss und schöne Weihnachten
Adrian