keironstoddart / edi-835-parser

A simple EDI 835 file format parser.
MIT License
80 stars 40 forks source link

invalid literal for int() with base 10: 'BDATA' #28

Open steven4354 opened 6 months ago

steven4354 commented 6 months ago

(edi-parser-py3.12) stevenli@Stevens-MBP edi_parser % python display_edi_file.py

Traceback (most recent call last): File "/Users/stevenli/Documents/github/steven4354/edi_parser/display_edi_file.py", line 7, in transaction_sets = parse(input_file_name) ^^^^^^^^^^^^^^^^^^^^^^ File "/Users/stevenli/Library/Caches/pypoetry/virtualenvs/edi-parser-o53mJRh5-py3.12/lib/python3.12/site-packages/edi_835_parser/init.py", line 28, in parse transaction_set = TransactionSet.build(path) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/stevenli/Library/Caches/pypoetry/virtualenvs/edi-parser-o53mJRh5-py3.12/lib/python3.12/site-packages/edi_835_parser/transaction_set/transaction_set.py", line 136, in build response = cls.build_attribute(segment, segments) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/stevenli/Library/Caches/pypoetry/virtualenvs/edi-parser-o53mJRh5-py3.12/lib/python3.12/site-packages/edi_835_parser/transaction_set/transaction_set.py", line 177, in build_attribute organization, segments, segment = OrganizationLoop.build(segment, segments) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/stevenli/Library/Caches/pypoetry/virtualenvs/edi-parser-o53mJRh5-py3.12/lib/python3.12/site-packages/edi_835_parser/loops/organization.py", line 32, in build organization.organization = OrganizationSegment(current_segment) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/stevenli/Library/Caches/pypoetry/virtualenvs/edi-parser-o53mJRh5-py3.12/lib/python3.12/site-packages/edi_835_parser/segments/organization.py", line 19, in init self.identification_code = int(segment[4]) if len(segment) >= 5 else None ^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: 'BDATA' (edi-parser-py3.12) stevenli@Stevens-MBP edi_parser %

SharkyDi3 commented 1 week ago

Did you get any solution to this? I'm facing the same error.