Comments (6)
Hi @rtobar,
Thanks! tabulator
passes its testes with master 👍
from ijson.
Example backtrace:
0x00007ffff6278500 in ?? ()
#1 0x00007fffe379af53 in parse_basecoro_send_impl (
self=<_yajl2.parse_basecoro at remote 0x7fffe3bd2870>,
event=event@entry='start_array', value=value@entry=None)
at ijson/backends/yajl2_c/parse_basecoro.c:102
#2 0x00007fffe379899b in add_event_and_value (val=<optimized out>,
evt_name='start_array', ctx=0x7fffe3bd2870)
at ijson/backends/yajl2_c/basic_parse_basecoro.c:25
#3 start_array (ctx=0x7fffe3bd2870)
at ijson/backends/yajl2_c/basic_parse_basecoro.c:112
#4 0x00007fffe358e317 in yajl_do_parse ()
from /home/jenkins/.local/lib/python3.7/site-packages/ijson/backends/../../ijson.libs/libyajl-da6a00d5.so.2.1.0
#5 0x00007fffe37990e5 in ijson_yajl_parse (handle=0x1fd5de0,
buffer=0x2156e10 "[{\"A\": \"A\", \"B\": \"B\"}, {\"A\": \"1\", \"B\": \"foo\"}]", length=length@entry=46)
at ijson/backends/yajl2_c/basic_parse_basecoro.c:133
#6 0x00007fffe379b2e1 in reading_generator_next (self=0x7fffe4689900)
at ijson/backends/yajl2_c/reading_generator.c:88
#7 0x00000000004db1f3 in enum_next (en=0x7fffe4662b40)
So, unsurprisingly, blame on the line added in 80da1dc
from ijson.
Thanks for the report @roll and for the details @bz2. This is indeed caused by the (buggy itself) fix for #28, which in hindsight is obviously wrong (isn't it always?). Also, despite we having 200+ unit tests and 99+% coverage this wasn't caught by our tests, so one can never be too prepared...
The problem should only appear when the top-level JSON structure is an array. I'll add tests to confirm I can duplicate the problem, and then will fix it, which will be easy. Expect a fix and a new release coming up shortly.
from ijson.
A fix is on the master
branch, and tests reproducing the original problem have been added to ensure this particular issue doesn't crop up again. @roll / @bz2 could you confirm this is now fixed? After receiving confirmation I'll be releasing ijson 3.0.3.
from ijson.
ijson 3.0.3 is now available in PyPI.
from ijson.
Thanks!
from ijson.
Related Issues (20)
- yajl2_c backend crashes on PyPy3 HOT 19
- Is there a way to recursively iterate the key? HOT 4
- ijson.items(file, prefix) waits for EOF HOT 8
- Wheels for Python 3.12 with yajl2_c backend HOT 4
- Include array index HOT 2
- Iterate over more than one prefix? HOT 2
- How to parse a large gzip json file. HOT 2
- Make new release HOT 2
- yajl2_c backend for lambda function HOT 2
- How to use ijson to covert string to dict? HOT 3
- How to read json records in chunks using ijson? HOT 4
- Question: is it possible that returing bytes instead of str could speedup parsing? HOT 3
- Thread safety HOT 9
- Full support for byte stream generator HOT 9
- Allow to use ijson package by a relative import HOT 4
- How can I most-efficiently check for a key in the top-level of a json object? HOT 3
- Python3.12 compilation error: ‘PyGenObject’ has no member named ‘gi_code’ HOT 5
- Is it possible to use isjon with Jsonl, ndjson ? HOT 5
- Memory leak on exception handling with yajl2_c backend HOT 6
- _yajl2 backend broken with Python 3.12 HOT 9
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 ijson.