Skip to content

Error parsing Entry: 12191 #10

Description

@sull6

all_entries, failed_parses = exfor_tools.curate.query_for_entries( # issue in entry 12191
exfor_tools.reaction.ElasticReaction(target=Pb208, projectile=(1, 0)),
quantity="dXS/dA",
Einc_range=[7, 60], # MeV
)
all_measurements = exfor_tools.curate.categorize_measurements_by_energy(all_entries)


AttributeError Traceback (most recent call last)
File ~/Coding/jitr/jitr-venv/lib/python3.12/site-packages/exfor_tools/curate.py:36, in query_for_entries(reaction, quantity, disclude, **kwargs)
35 try:
---> 36 parsed_entry = ExforEntry(
37 entry,
38 reaction,
39 quantity,
40 **kwargs,
41 )
42 except Exception as e:

File ~/Coding/jitr/jitr-venv/lib/python3.12/site-packages/exfor_tools/exfor_entry.py:144, in ExforEntry.init(self, entry, reaction, quantity, Einc_range, Ex_range, vocal, MeasurementClass, parsing_kwargs, filter_kwargs)
143 # parse any common errors
--> 144 self.err_analysis = extract_err_analysis(common_subentry)
145 if "COMMON" in common_subentry.keys():

File ~/Coding/jitr/jitr-venv/lib/python3.12/site-packages/exfor_tools/exfor_entry.py:62, in extract_err_analysis(common_subent)
61 def extract_err_analysis(common_subent):
---> 62 sections = common_subent.repr().split("\n")
63 ea_sections = []

File ~/Coding/jitr/jitr-venv/lib/python3.12/site-packages/x4i3/exfor_subentry.py:87, in X4SubEntry.repr(self)
86 for i in self.sorted_keys:
---> 87 ans += repr(self[i]) + '\n'
88 ans += 'ENDSUBENT'.ljust(11)

File ~/Coding/jitr/jitr-venv/lib/python3.12/site-packages/x4i3/exfor_section.py:87, in X4BibSection.repr(self)
85 def repr(self):
86 ans = self.tag.ljust(11) + repr(len(self)).rjust(11) +
---> 87 repr(self.totalLen()).rjust(11) + '\n'
88 for i in self.sorted_keys:

File ~/Coding/jitr/jitr-venv/lib/python3.12/site-packages/x4i3/exfor_section.py:119, in X4BibSection.totalLen(self)
118 def totalLen(self):
--> 119 return sum([self[i].total_len() for i in self])

AttributeError: 'NoneType' object has no attribute 'total_len'

The above exception was the direct cause of the following exception:

AttributeError Traceback (most recent call last)
Cell In[6], line 1
----> 1 all_entries, failed_parses = exfor_tools.curate.query_for_entries( # issue in entry 12191
2 exfor_tools.reaction.ElasticReaction(target=Pb208, projectile=(1, 0)),
3 quantity="dXS/dA",
4 Einc_range=[7, 60], # MeV
5 )
6 all_measurements = exfor_tools.curate.categorize_measurements_by_energy(all_entries)

File ~/Coding/jitr/jitr-venv/lib/python3.12/site-packages/exfor_tools/curate.py:44, in query_for_entries(reaction, quantity, disclude, **kwargs)
42 except Exception as e:
43 new_exception = type(e)(f"Error while parsing Entry: {entry}")
---> 44 raise new_exception from e
45 if (
46 len(parsed_entry.failed_parses) == 0
47 and len(parsed_entry.measurements) > 0
48 ):
49 successfully_parsed_entries[entry] = parsed_entry

AttributeError: Error while parsing Entry: 12191

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions