-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Summary
iBeatles v1.2.1 includes a workaround that pins pandas <3 in the conda recipe to avoid a crash on startup.
Root Cause
The neutronbraggedge package uses positional indexing with [] on pandas Series objects, which fails in pandas 3.0:
# neutronbraggedge/material_handler/retrieve_material_metadata.py:68
self.lattice = float(_metadata[0]) # Fails in pandas 3.0In pandas 3.0, [] is strictly for label-based access. Positional access requires .iloc[]:
self.lattice = float(_metadata.iloc[0]) # CorrectAffected Files in neutronbraggedge
retrieve_material_metadata.py:68,72- Uses_metadata[0]and_metadata[1]braggedge.py:249-if file_type is 'csv':(SyntaxWarning, should use==)tof.py:61-if units is not 's':(SyntaxWarning, should use!=)
Proper Fix
The proper fix should be implemented in the upstream neutronbraggedge package:
- Repository: https://github.com/ornlneutronimaging/BraggEdge
- Replace
[]indexing with.iloc[]for positional access - Replace
is/is notwith==/!=for string comparisons
Workaround in iBeatles
Until the upstream fix is released, iBeatles pins pandas <3 in conda.recipe/meta.yaml.
Related
- See upstream issue: (to be created in BraggEdge repo)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels