New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'AttributeError: _cant_write_msg' #339

Closed
bb-migration opened this Issue Jan 26, 2015 · 4 comments

Comments

Projects
None yet
1 participant
@bb-migration

bb-migration commented Jan 26, 2015

Originally reported by: gpjt (Bitbucket: gpjt, GitHub: gpjt)


As of 12.0.2, installing to a non-writeable directory (eg. easy_install foo without sudo or the --user flag) gives the following error:

#!python

File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 486, in cant_write_to_target
msg = self._cant_write_msg % (sys.exc_info()[1], self.install_dir,)
File "/usr/lib/python2.7/distutils/cmd.py", line 105, in __getattr__
raise AttributeError, attr
AttributeError: _cant_write_msg

The problem appears to be commit 3e99647 ("Extract messages as class attributes for nicer indentation") where the error message was extracted to the class variable
__cant_write_msg (two underscores) but the function cant_write_to_target looks it up using self._cant_write_msg (one underscore).

The other error messages (__not_exists_id, __not_exists_id) are OK so this is a single-character fix :-)


@bb-migration

This comment has been minimized.

bb-migration commented Jan 26, 2015

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Reference the proper attribute. Fixes #339.

@bb-migration

This comment has been minimized.

bb-migration commented Jan 26, 2015

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Add test capturing Attribute error. Ref #339.

@bb-migration

This comment has been minimized.

bb-migration commented Jan 26, 2015

Original comment by gpjt (Bitbucket: gpjt, GitHub: gpjt):


Awesome, thanks! We'll stick with 12.0.1 for the time being but will keep an eye out for the next release.

@bb-migration

This comment has been minimized.

bb-migration commented Jan 26, 2015

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


12.0.5 should be out now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment