Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8514565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:54:21+00:00 2026-06-11T04:54:21+00:00

The version I used is python2.7, error occurs when I used script, but it

  • 0

The version I used is python2.7, error occurs when I used script, but it works in command line.

from twisted.internet import protocol, reactor  

and the errors:

ravjqpejcnngpig.eqo/re/fgh/ocr
Traceback (most recent call last):
  File "./tsTclntTW.py", line 5, in <module>
    from twisted.internet import protocol, reactor
  File "/usr/local/lib/python2.7/dist-packages/twisted/__init__.py", line 18, in <module>
    from zope.interface import Interface
  File "/usr/local/lib/python2.7/dist-packages/zope.interface-4.0.1-py2.7-linux-x86_64.egg/zope/__init__.py", line 3, in <module>
    import pkg_resources
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 698, in <module>
    self.callbacks.append(callback)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 701, in Environment

  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 96, in get_supported_platform
    distutils.util.get_platform() normally reports the minimum version
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 222, in get_build_platform
    # fallback for MacPorts
  File "/usr/lib/python2.7/distutils/util.py", line 65, in get_platform
    osname = string.lower(osname)
AttributeError: 'module' object has no attribute 'lower'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 18, in <module>
    import problem_report
  File "/usr/lib/python2.7/dist-packages/problem_report.py", line 16, in <module>
    from email.mime.multipart import MIMEMultipart
  File "/usr/lib/python2.7/email/mime/multipart.py", line 9, in <module>
    from email.mime.base import MIMEBase
  File "/usr/lib/python2.7/email/mime/base.py", line 9, in <module>
    from email import message
  File "/usr/lib/python2.7/email/message.py", line 16, in <module>
    import email.charset
  File "/usr/lib/python2.7/email/charset.py", line 14, in <module>
    import email.quoprimime
  File "/usr/lib/python2.7/email/quoprimime.py", line 48, in <module>
    from string import hexdigits
ImportError: cannot import name hexdigits

Original exception was:
Traceback (most recent call last):
  File "./tsTclntTW.py", line 5, in <module>
    from twisted.internet import protocol, reactor
  File "/usr/local/lib/python2.7/dist-packages/twisted/__init__.py", line 18, in <module>
    from zope.interface import Interface
  File "/usr/local/lib/python2.7/dist-packages/zope.interface-4.0.1-py2.7-linux-x86_64.egg/zope/__init__.py", line 3, in <module>
    import pkg_resources
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 698, in <module>
    self.callbacks.append(callback)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 701, in Environment

  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 96, in get_supported_platform
    distutils.util.get_platform() normally reports the minimum version
  File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 222, in get_build_platform
    # fallback for MacPorts
  File "/usr/lib/python2.7/distutils/util.py", line 65, in get_platform
    osname = string.lower(osname)
AttributeError: 'module' object has no attribute 'lower'

I have re-installed the Python I used and it doesn’t work, I’m in Ubuntu 12.04. Also I have do

grep ravjqpejcnngpig.eqo/re/fgh/ocr . -R -n

under /usr/lib/python2.7 but nothing returned.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T04:54:22+00:00Added an answer on June 11, 2026 at 4:54 am

    Perhaps you have a module named string in your project, and it shadows the library module of the same name.


    EDIT: To find out, add this to your script just before the failing import statement:

    import string
    print string.__file__
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Used Dojo 1.0, but I have some version related questions: When will
buildbot version being used is: $ buildbot --version Buildbot version: 0.8.3p1 Twisted version: 10.1.0
Is there a way to upgrade the version of Python used in a virtual
Version used: Delphi 7. I'm working on a program that does a simple for
well iam trying to get version of IE used by user by using $.browser.version
I used the latest trunk version of gpuocelot on a mac snow 10.6.8 with
I used the latest sIFR version, and for some reason it shows the title
I used the latest build of IKVM (7.0.4335.0) to convert the newest version of
Where I used to work, we version-controlled with Mercurial. I have a new job
What is the version of Eclipse that can be used to draw the UML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.