PyCall error I don't understand

Hi all,

I’ve got an error I don’t understand. It happends every couple of minutes. Can anyone help?

So what I did:
I use PyCall.jl with boto3 to upload to s3. Before that I use JSON.jl to serialise. The data structure is rather large.

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x7ffc3c3ec9c7 -- PyObject_GetDictPtr at C:\Users\<user>\AppData\Local\Programs\Python\Python38\python38.dll (unknown line)
in expression starting at \\<user>\Projects\julia\project_name\project_name.jl:17
PyObject_GetDictPtr at C:\Users\<user>\AppData\Local\Programs\Python\Python38\python38.dll (unknown line)
pydecref_ at D:\.julia\packages\PyCall\BD546\src\PyCall.jl:118 [inlined]
pydecref at D:\.julia\packages\PyCall\BD546\src\PyCall.jl:123
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
run_finalizer at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:278
jl_gc_run_finalizers_in_list at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:365
run_finalizers at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:394 [inlined]
run_finalizers at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:372
jl_gc_collect at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:3260
maybe_collect at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:880 [inlined]
jl_gc_pool_alloc at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:1204 [inlined]
jl_gc_alloc_ at /cygdrive/c/buildbot/worker/package_win64/build/src\julia_internal.h:285 [inlined]
jl_gc_alloc at /cygdrive/c/buildbot/worker/package_win64/build/src\gc.c:3283
_new_array_ at /cygdrive/c/buildbot/worker/package_win64/build/src\array.c:122
_new_array at /cygdrive/c/buildbot/worker/package_win64/build/src\array.c:188 [inlined]
jl_alloc_array_1d at /cygdrive/c/buildbot/worker/package_win64/build/src\array.c:459
Array at .\boot.jl:448 [inlined]
Array at .\boot.jl:457 [inlined]
similar at .\abstractarray.jl:750 [inlined]
similar at .\abstractarray.jl:742 [inlined]
_similar_for at .\array.jl:575 [inlined]
_collect at .\array.jl:608
collect at .\array.jl:602 [inlined]
CompositeTypeWrapper at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:22
unknown function (ip: 000000006fb3a0f2)
CompositeTypeWrapper at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:23
lower at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:45 [inlined]
show_json at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:314 [inlined]
show_pair at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:241 [inlined]
show_pair at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:243 [inlined]
show_json at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:271
show_pair at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:241 [inlined]
show_pair at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:243
unknown function (ip: 000000006fb399b4)
show_json at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:271
show_pair at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:241 [inlined]
show_pair at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:243 [inlined]
show_json at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:271
show_pair at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:241
unknown function (ip: 000000006fb355d2)
show_pair at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:243
show_json at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:271
#show_json#3 at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:325 [inlined]
show_json at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:324 [inlined]
print at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:349
unknown function (ip: 000000006fb2ce64)
#sprint#385 at .\strings\io.jl:105
unknown function (ip: 000000006fb2c66c)
sprint at .\strings\io.jl:101 [inlined]
json at D:\.julia\packages\JSON\QXB8U\src\Writer.jl:365
unknown function (ip: 000000006fb25d60)
macro expansion at \\<user>\Projects\julia\project_name\src\events\sort_and_process_events\sort_and_process_events.jl:14 [inlined]
macro expansion at D:\.julia\packages\Utils\w2zuH\src\Utils.jl:51 [inlined]
__processing_events at \\<user>\Projects\julia\project_name\src\events\sort_and_process_events\sort_and_process_events.jl:12
__processing_events at \\<user>\Projects\julia\project_name\src\events\sort_and_process_events\sort_and_process_events.jl:8 [inlined]
#8 at .\threadingconstructs.jl:169
unknown function (ip: 000000005fb476b3)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
start_task at /cygdrive/c/buildbot/worker/package_win64/build/src\task.c:839
Allocations: 1281756587 (Pool: 1281730764; Big: 25823); GC: 165

We can’t really help you much without knowing what you did :slight_smile:

1 Like

Added a bit more above.

Could it be that I have a too big string and python can’t handle it?

It’s a possibility, since the stacktrace seems to indicate some problem during finalization of some python object. There’s not much more to suggest though without the code that produced that error.

How large is your data? How much RAM do you have? What code did you run?