Skip to content
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
ghost opened this issue Jan 26, 2015 · 4 comments
Closed

'AttributeError: _cant_write_msg' #339

ghost opened this issue Jan 26, 2015 · 4 comments
Labels

Comments

@ghost
Copy link

@ghost ghost 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 :-)


@ghost
Copy link
Author

@ghost ghost commented Jan 26, 2015

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


Reference the proper attribute. Fixes #339.

@ghost
Copy link
Author

@ghost ghost commented Jan 26, 2015

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


Add test capturing Attribute error. Ref #339.

@ghost
Copy link
Author

@ghost ghost 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.

@ghost
Copy link
Author

@ghost ghost commented Jan 26, 2015

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


12.0.5 should be out now.

@ghost ghost added major bug 12.0.2 labels Mar 29, 2016
@ghost ghost closed this Mar 29, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
0 participants