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

module 'string' has no attribute 'join' #2

Closed
ikfj opened this issue May 12, 2017 · 2 comments
Closed

module 'string' has no attribute 'join' #2

ikfj opened this issue May 12, 2017 · 2 comments

Comments

@ikfj
Copy link

ikfj commented May 12, 2017

Hi,
When I tried to do e.g. print(nvmlDeviceGetName(h)) I got the following error.

File "/home/**/build/nvidia-ml-py/src/py3nvml/py3nvml/py3nvml.py", line 399, in __str__
    return self.__class__.__name__ + "(" + string.join(result, ", ") + ")"
AttributeError: module 'string' has no attribute 'join'

I'm sorry but I'm blind to Python and I have no idea. Could you investigate it?

@fbcotter
Copy link
Owner

The nvmlDeviceGetName() function shouldn't call the code that was causing the above error. Are you sure that was what caused it?

However, there is still a bug, if you call print(nvmlDeviceGetMemoryInfo(handle)), then it should throw the same error.

I've pushed a fix up to master. Try pulling and see if that works.

@ikfj
Copy link
Author

ikfj commented May 13, 2017

Hi fbcoder, you are right, what I tried was print(nvmlDeviceGetUtilizationRates(handle)).
And yes, now it works well. Thank you for your effort!

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

2 participants