Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JOSN.print throws StackOverflow error #334

Open
cocoa1231 opened this issue Dec 26, 2021 · 0 comments
Open

JOSN.print throws StackOverflow error #334

cocoa1231 opened this issue Dec 26, 2021 · 0 comments

Comments

@cocoa1231
Copy link

So I was trying to export the Plots.PyPlot.matplotlib.rcParams dictionary to a JSON file so I could use that configuration in my Python code (since the default plots made by Plots.jl are quite nice looking), so I wrote the following to export it to a JSON file -

using JSON
using Plots

pyplot()
configs = Plots.PyPlot.matplotlib.rcParams

open("rcParams.json", "w") do f
    JSON.print(f, configs)
end

However it throws this StackOverflow error

ERROR: LoadError: StackOverflowError:
in expression starting at /home/cocoa/Documents/DarkMatterProject/JuliaCode/main.jl:7

I'm unsure what the issue is here. It works fine for a test dictionary I made

julia> td = Dict("Hello" => 1, "World" => 2)
Dict{String, Int64} with 2 entries:
  "Hello" => 1
  "World" => 2

julia> JSON.print(td)
{"Hello":1,"World":2}

Perhaps some issue with the dictionary? Here is the full dictionary - https://paste.debian.net/1224856/

Appreciate your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant