Comments (4)
I am not able to reproduce your example. Perhaps we could start with a concrete example. From what I can see, the ST segments do repeat properly. There is only one instance of an ST loop though. Is that your complaint?
https://gist.github.com/azoner/5286718
from pyx12.
Please have a look at these (both are 4010) -
https://gist.github.com/deepakstrigent/5291427
https://gist.github.com/deepakstrigent/5291438
For 832 the maps are newly written (included in gist). 830 is already present in pyX12
Have a look at second segment in GS_LOOP for both cases
The ST information is parsed as GS and it occurs outside of ST_LOOP
Also tried a sample 820 with the same result.
I get the same error while parsing both -
2013-04-02 16:13:35,852 ERROR No current segment in error_handler. Line:3 SEG:1 - Segment ST*832 not found. Started at /ISA_LOOP/GS_LOOP/GS[SC]
2013-04-02 16:13:35,869 ERROR No current segment in error_handler. Line:46 SEG:3 - Mandatory segment "Transaction Set Header" (ST) missing
Traceback (most recent call last):
File "/home/xxxx/envs/xxxx1/bin/x12xml", line 9, in <module>
load_entry_point('pyx12==2.0.0', 'console_scripts', 'x12xml')()
File "/home/xxxx/envs/xxxx1/local/lib/python2.7/site-packages/pyx12/scripts/x12xml.py", line 112, in main
fd_997=None, fd_html=None, fd_xmldoc=fd_xml)
File "/home/xxxx/envs/xxxx1/local/lib/python2.7/site-packages/pyx12/x12n_document.py", line 185, in x12n_document
errh.close_st_loop(node, seg, src)
File "/home/xxxx/envs/xxxx1/local/lib/python2.7/site-packages/pyx12/error_handler.py", line 318, in close_st_loop
self.cur_st_node.close(node, seg, src)
AttributeError: 'NoneType' object has no attribute 'close'
from pyx12.
John,
Was able to fix the above issue. Not sure how good the fix is - https://gist.github.com/deepakstrigent/5300411
Had to add the walker to stop it to throw ST not found exception.
Now single instance of ST_LOOP is definitely an issue. Again have a stop gap wrapper written around to solve it. But could it be possible to have ST_LOOP per transaction set?
from pyx12.
This is a general issue of loop xml elements not being generated for loop repeats - not limited to ST_LOOP.
from pyx12.
Related Issues (20)
- JSON error and parsing output HOT 2
- Convert from setuptools resource loading to pkgtools HOT 2
- x12xml_idtag.py location or is it deprecated?
- x12xml crashing in dataele.py
- Help - Parse EDI file into XML HOT 2
- XML map for 837D claim HOT 2
- pyx12 usage issue HOT 1
- Tabs not being treated as invalid
- Add map file for 5010 279A1
- 834 5010 LX sequence # collisions? HOT 4
- Error when parsing a 271 file HOT 1
- Help - Parse data in multiple files (not really an issue, a question) HOT 1
- 835 - missing Adjustment Reason Code HOT 5
- Feature Request: Remove validation of external defined code sets HOT 4
- ERROR Failed to create 999 response- X12 file validation HOT 4
- Error parsing 277 file HOT 1
- can it convert to a tabular data format excel or tab delimited file ? HOT 1
- x12valid throwing TypeError: 'NoneType' object is not iterable
- Is this project alive or dead? HOT 1
- Can we please update the pyx12/map/codes.xml
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyx12.