Git Product home page Git Product logo

Comments (6)

roll avatar roll commented on July 22, 2024 1

Hi @rtobar,

Thanks! tabulator passes its testes with master 👍

from ijson.

bz2 avatar bz2 commented on July 22, 2024

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.

rtobar avatar rtobar commented on July 22, 2024

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.

rtobar avatar rtobar commented on July 22, 2024

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.

rtobar avatar rtobar commented on July 22, 2024

ijson 3.0.3 is now available in PyPI.

from ijson.

roll avatar roll commented on July 22, 2024

Thanks!

from ijson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.