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

TypeError: <built-in function max> is not JSON serializable #99

Closed
altsheets opened this Issue Sep 6, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@altsheets

altsheets commented Sep 6, 2015

Error

  TypeError: <built-in function max> is not JSON serializable

for minimal_demo.py

All the other demos are working perfectly.

I am quite intrigued by Gooey, kudos for this great tool!

Thanks!

Full error report:

    Writing Build Config to: ...Gooey\gooey\examples\gooey_config.json

    Traceback (most recent call last):
      File "...Gooey\gooey\examples\minimal_demo.py", line 18, in <module>
        main()
      File "C:\Anaconda\lib\site-packages\gooey\python_bindings\gooey_decorator.py", line 58, in inner2
        return payload(*args, **kwargs)
      File "...Gooey\gooey\examples\minimal_demo.py", line 13, in main
        args = parser.parse_args()
      File "C:\Anaconda\lib\site-packages\gooey\python_bindings\gooey_decorator.py", line 52, in run_gooey
        f.write(json.dumps(build_spec, indent=2))
      File "C:\Anaconda\lib\json\__init__.py", line 250, in dumps
        sort_keys=sort_keys, **kw).encode(obj)
      File "C:\Anaconda\lib\json\encoder.py", line 209, in encode
        chunks = list(chunks)
      File "C:\Anaconda\lib\json\encoder.py", line 434, in _iterencode
        for chunk in _iterencode_dict(o, _current_indent_level):
      File "C:\Anaconda\lib\json\encoder.py", line 408, in _iterencode_dict
        for chunk in chunks:
      File "C:\Anaconda\lib\json\encoder.py", line 332, in _iterencode_list
        for chunk in chunks:
      File "C:\Anaconda\lib\json\encoder.py", line 408, in _iterencode_dict
        for chunk in chunks:
      File "C:\Anaconda\lib\json\encoder.py", line 408, in _iterencode_dict
        for chunk in chunks:
      File "C:\Anaconda\lib\json\encoder.py", line 442, in _iterencode
        o = _default(o)
      File "C:\Anaconda\lib\json\encoder.py", line 184, in default
        raise TypeError(repr(o) + " is not JSON serializable")

    TypeError: <built-in function max> is not JSON serializable
@chriskiehl

This comment has been minimized.

Show comment
Hide comment
@chriskiehl

chriskiehl Sep 6, 2015

Owner

Fixed!

Note: This has been fixed in the Examples Repository. So checkout the repo for the updated code.

The examples that are currently in the core Gooey package are being removed because site-packages is a pretty wonky place for them to live.

Thanks for the bug!

Owner

chriskiehl commented Sep 6, 2015

Fixed!

Note: This has been fixed in the Examples Repository. So checkout the repo for the updated code.

The examples that are currently in the core Gooey package are being removed because site-packages is a pretty wonky place for them to live.

Thanks for the bug!

@chriskiehl chriskiehl closed this Sep 6, 2015

@altsheets

This comment has been minimized.

Show comment
Hide comment
@altsheets

altsheets Sep 6, 2015

Thx for the quick fix!

altsheets commented Sep 6, 2015

Thx for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment