Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1206417 - [abrt] python-setuptools: cmd.py:105:__getattr__:AttributeError: _cant_write_msg
Summary: [abrt] python-setuptools: cmd.py:105:__getattr__:AttributeError: _cant_write_msg
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: python-setuptools
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:4c31e428dea5505114d160eef08...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-27 03:25 UTC by Bruno Roberto Zanuzzo
Modified: 2015-07-26 20:16 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-26 20:16:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (deleted)
2015-03-27 03:25 UTC, Bruno Roberto Zanuzzo
no flags Details
File: environ (deleted)
2015-03-27 03:25 UTC, Bruno Roberto Zanuzzo
no flags Details

Description Bruno Roberto Zanuzzo 2015-03-27 03:25:07 UTC
Description of problem:
I was trying to install web.py using easy_install, so: 

1. open the terminal Konsole (here KDE environment)
2. run the command: $ easy_install web.py (yes, without sudo (I forgot the first time actually))
3. without permission an exception was raised: cmd.py:105:__getattr__:AttributeError: _cant_write_msg and then python-setuptools "python quit unexpectedly"

I tested three times, same result.

Version-Release number of selected component:
python-setuptools-12.0.3-1.fc22

Additional info:
reporter:       libreport-2.5.0
cmdline:        /usr/bin/python /bin/easy_install web.py
dso_list:       python-libs-2.7.9-5.fc22.x86_64
executable:     /bin/easy_install
kernel:         4.0.0-0.rc4.git0.1.fc22.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
cmd.py:105:__getattr__:AttributeError: _cant_write_msg

Traceback (most recent call last):
  File "/bin/easy_install", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 2244, in main
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 971, in run_command
    cmd_obj.ensure_finalized()
  File "/usr/lib64/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 303, in finalize_options
    self.check_site_dir()
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 427, in check_site_dir
    self.cant_write_to_target()
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 485, in cant_write_to_target
    msg = self._cant_write_msg % (sys.exc_info()[1], self.install_dir,)
  File "/usr/lib64/python2.7/distutils/cmd.py", line 105, in __getattr__
    raise AttributeError, attr
AttributeError: _cant_write_msg

Local variables in innermost frame:
self: <setuptools.command.easy_install.easy_install instance at 0x7f43bdba4d88>
attr: '_cant_write_msg'

Comment 1 Bruno Roberto Zanuzzo 2015-03-27 03:25:11 UTC
Created attachment 1007088 [details]
File: backtrace

Comment 2 Bruno Roberto Zanuzzo 2015-03-27 03:25:12 UTC
Created attachment 1007089 [details]
File: environ

Comment 3 Ralph Bean 2015-03-27 19:19:14 UTC
Have you tried using a virtualenv?  From what I understand, you should not be able to easy_install stuff directly without one.

For what its worth, 'pip' is the tool preferred by upstream to install python packages from pypi.

Comment 4 Bruno Roberto Zanuzzo 2015-03-27 20:46:15 UTC
Hi Ralph.

Yes, I tried the virtualenv and both: easy_install and pip are working well with normal user privileges.

My point was about exception handling to avoid this python-setuptools crash caught by ABRT when normal users (without sudo) are trying to install some python packages in the global environment using easy_install.

Comment 5 Abhay Kadam 2015-05-29 09:42:53 UTC
Another user experienced a similar problem:

just entered following command at the prompt:

$ easy_install

reporter:       libreport-2.5.1
cmdline:        /usr/bin/python /usr/bin/easy_install
dso_list:       python-libs-2.7.9-6.fc22.x86_64
event_log:      2015-05-29-15:11:11> ('report_uReport' completed successfully)
executable:     /usr/bin/easy_install
kernel:         4.0.4-301.fc22.x86_64
package:        python-setuptools-12.0.3-1.fc22
reason:         cmd.py:105:__getattr__:AttributeError: _cant_write_msg
runlevel:       N 5
type:           Python
uid:            1000

Comment 6 Ralph Bean 2015-06-01 16:00:46 UTC
The latest python-setuptools in rawhide fixes this:

http://koji.fedoraproject.org/koji/buildinfo?buildID=640159

We could try an update for F22.

Comment 7 Fedora Update System 2015-06-01 16:28:55 UTC
python-setuptools-17.0-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/python-setuptools-17.0-1.fc22

Comment 8 Fedora Update System 2015-06-14 17:27:02 UTC
python-setuptools-17.0-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.