-
Notifications
You must be signed in to change notification settings - Fork 73
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
Can't import rootpy in Python 3.8 #812
Comments
import rootpy
in Python 3.8
I also get the same error while importing into python3.8. I am using the latest rootproject/root-archlinux docker image. I tried to use @masonproffitt fix, directly from their fork as they described above. The issue with
|
I also faced a similar issue while converting a ROOT file into a hdf5 file using root2hdf5. Were you able to find any solution to this error? |
@sahilyadav27 No I didn't succeed. Seems to be a more detailed problem. For your application maybe you can check uproot, to read ROOT files and convert them to hdf5 format yourself using h5py. |
Thanks for the information @xaratustrah ! I was able to solve this issue by downgrading python to 3.7 since rootpy doesn't work well with 3.8. But there were some other issues while reading tree branches though. |
It does not work also in python 3.9 |
If you try to use rootpy in Python 3.8, this is what happens:
This is because
CustomFormatter
callslogging.Formatter.__init__()
with a.format()
style string, but thestyle
forFormatter
defaults to'%'
(see https://docs.python.org/3/library/logging.html#logging.Formatter).format()
is overridden for the class, which is why everything works in Python versions before 3.8, but 3.8 added avalidate=True
parameter, which verifies that the given string actually follows the expected format. Otherwise it raises an error like above.The text was updated successfully, but these errors were encountered: