2016-05-12 7 views
0

私は(wcrawler.py)スクリプトをテストしていた。マルチファイル.pyはpythonコマンドに影響しますか?

import requests 

とエラーを取得:

... 
File "/usr/lib/python2.7/ssl.py", line 90, in <module> 
     import textwrap 
     File "/usr/lib/python2.7/textwrap.py", line 40, in <module> 
     class TextWrapper: 
     File "/usr/lib/python2.7/textwrap.py", line 82, in TextWrapper 
     whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace)) 
    AttributeError: 'module' object has no attribute 'maketrans' 

はので、私はちょうど別のディレクトリに他のスクリプトを変更して、同じコマンドを使用:pythonのwcrawlerを。 py

価値がありますが、私はなぜそれについて何か知っていますか?

+0

スクリプトの* only *行ですか?また、トレースバックの**フルテキスト**を投稿してください。 – MattDMo

+0

実際の文字列libのかわりに、textwrapがインポートされているパスのどこかにstring.pyという名前のスクリプトがある可能性があります –

答えて

0

あなたは、最も可能性の高いtextwrapではなく、実際の文字列LIBのからインポートされたパス のどこかにstring.pyという名前のスクリプトいる - パドレイクカニンガム

はまさにそれでした!

関連する問題