You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/martinrey/Documents/stellar_halos/plot_surface_brightness.py", line 70, in <module>
profile2d.write()
File "/opt/anaconda3/lib/python3.7/site-packages/pynbody-0.48-py3.7-macosx-10.9-x86_64.egg/pynbody/analysis/profile.py", line 551, in write
filename = self._generate_hash_filename()
File "/opt/anaconda3/lib/python3.7/site-packages/pynbody-0.48-py3.7-macosx-10.9-x86_64.egg/pynbody/analysis/profile.py", line 522, in _generate_hash_filename
(hashlib.md5(self._x, usedforsecurity=False)).hexdigest()
TypeError: openssl_md5() takes no keyword arguments
From what I have understood, the keyword usedforsecurity is unsafe because not supported across all platforms. But my understanding of hashing algorithms is fairly limited (to say the least) and I don't understand whether it is necessary in this context.
Hope that helps,
Martin
The text was updated successfully, but these errors were encountered:
Yes, I can look and figure out a fix to this. As for a test, I will try but this seems to arise from differences in backend implementations on different operating systems, and I am unsure how to capture this in the Travis build. Will have a go anyway.
Hi all,
I am trying to write a
pynbody.profile.Profile
object, using its build-in methodwrite()
:pynbody/pynbody/analysis/profile.py
Line 481 in 6b0ded6
which fails with the following trace:
Thanks to https://stackoverflow.com/questions/54717862/how-do-i-know-if-the-usedforsecurity-flag-is-supported-by-hashlib-md5 and sphinx-doc/sphinx#7611, I have tracked this to the fact that my platform (Mac OS) does not support the
usedforsecurity
keyword used in the hashing here:pynbody/pynbody/analysis/profile.py
Lines 468 to 477 in 6b0ded6
From python,
hash lib
is indeed missing the keywordfor the following platform configuration
From what I have understood, the keyword
usedforsecurity
is unsafe because not supported across all platforms. But my understanding of hashing algorithms is fairly limited (to say the least) and I don't understand whether it is necessary in this context.Hope that helps,
Martin
The text was updated successfully, but these errors were encountered: