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

Unicode/string issue on Python 2.7 #59

Closed
cowlinator opened this issue Mar 1, 2018 · 1 comment
Closed

Unicode/string issue on Python 2.7 #59

cowlinator opened this issue Mar 1, 2018 · 1 comment

Comments

@cowlinator
Copy link

I am running into an issue in artifactory 0.1.17 on python 2.7.14 (32 bit).

The code parsed.append(intern(x)) in pathlib._Flavour.parse_parts() is raising the exception TypeError: intern() argument 1 must be string, not unicode.

I found that this is ultimately due to configparser.ConfigParser.read() in artifactory.read_config() returning unicode strings, but those are never converted via str(s) anywhere.

I was able to workaround this with the following code:

import artifactory
# fix for bug in artifactory module, caused by unicode/str issues
artifactory.read_global_config()
new_config = {}
for section in artifactory.global_config:
    new_config[str(section)] = artifactory.global_config[section]
    artifactory.global_config[section] = None
artifactory.global_config = new_config
@cowlinator
Copy link
Author

Actually, this is a duplicate of #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant