evpo / EncryptPad

Minimalist secure text editor and binary encryptor that implements RFC 4880 Open PGP format: symmetrically encrypted, compressed and integrity protected. The editor can protect files with passwords, key files or both.
https://evpo.net/encryptpad
Other
433 stars 64 forks source link

Unable to configure encryptpad: TypeError: Object of type bytes is not JSON serializable #89

Closed kekePower closed 4 years ago

kekePower commented 4 years ago

Just cloned git master and get this message when I try to configure it.

Am using Python 3.8 on Mageia Cauldron x86_64 with botan and zlib devel packages installed.

% ./configure.py
   INFO: ./configure.py invoked with options ""
   INFO: Guessing target OS is linux (use --os to set)
   INFO: Guessing to use compiler gcc (use --cc or CXX to set)
   INFO: Guessing target processor is a x86_64 (use --cpu to set)
   INFO: Autodetected platform information: OS="Linux" machine="x86_64" proc="x86_64"
   INFO: Defaulting to assuming little endian
   INFO: Executing: pkg-config --cflags botan-2
   INFO: Executing: pkg-config --libs botan-2
   INFO: Executing: pkg-config --cflags zlib
   INFO: Executing: pkg-config --libs zlib
   INFO: Using symlink to link files into build dir (use --link-method to change)
   INFO: Executing: qmake -r -spec linux-g++ CONFIG+=release EncryptPad.pro in build/qt_build
Info: creating stash file /projects/encryptpad/EncryptPad/build/qt_build/.qmake.stash
   INFO: Executing: /usr/bin/python3 ./configure.py --cc gcc --cpu x86_64 --os linux --static-linking --deps-dir /projects/encryptpad/EncryptPad/deps
   INFO: ./configure.py invoked with options "--cc gcc --cpu x86_64 --os linux --static-linking --deps-dir /projects/encryptpad/EncryptPad/deps"
   INFO: Autodetected platform information: OS="Linux" machine="x86_64" proc="x86_64"
   INFO: Defaulting to assuming little endian
   INFO: Executing: pkg-config --cflags botan-2
   INFO: Executing: pkg-config --cflags zlib
   INFO: Using symlink to link files into build dir (use --link-method to change)
  ERROR: Traceback (most recent call last):
  File "./configure.py", line 1988, in <module>
    sys.exit(main(argv=sys.argv))
  File "./configure.py", line 1982, in main
    configure_encryptmsg(argv[0], options)
  File "./configure.py", line 1971, in configure_encryptmsg
    do_io_for_build(cc, arch, osinfo, info_modules.values(), build_paths, source_paths, template_vars, options)
  File "./configure.py", line 1594, in do_io_for_build
    json.dump(template_vars, f, sort_keys=True, indent=2)
  File "/usr/lib64/python3.8/json/__init__.py", line 179, in dump
    for chunk in iterable:
  File "/usr/lib64/python3.8/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/usr/lib64/python3.8/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib64/python3.8/json/encoder.py", line 438, in _iterencode
    o = _default(o)
  File "/usr/lib64/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type bytes is not JSON serializable

An internal error occurred.

Don't panic, this is probably not your fault!
evpo commented 4 years ago

Thanks for reporting. It should be fixed now. Please let me know if there are any issues.

kekePower commented 4 years ago

Hi @evpo

Your fix worked like a charm.

Thank you :-)