KnugiHK / WhatsApp-Chat-Exporter

A customizable Android and iOS/iPadOS WhatsApp database parser that will give you the history of your WhatsApp conversations in HTML and JSON. Android Backup Crypt12, Crypt14, Crypt15, and new schema supported.
https://wts.knugi.dev/
MIT License
586 stars 85 forks source link

TypeError: Object of type ChatStore is not JSON serializable #37

Closed velecto1 closed 1 year ago

velecto1 commented 1 year ago

Hello, I got this error when running the current 'message_table' branch with '--json' option:

...
Gathering media...(4301/4301)
Gathering vCards...(6/6)
Copying media directory...
Traceback (most recent call last):
  File "/usr/local/bin/wtsexporter", line 8, in <module>
    sys.exit(main())
  File "/home/tomtom/.local/lib/python3.8/site-packages/Whatsapp_Chat_Exporter/__main__.py", line 222, in main
    data = json.dumps(data)
  File "/usr/lib/python3.8/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ChatStore is not JSON serializable
KnugiHK commented 1 year ago

I noticed this issue when #26 was raised.

KnugiHK commented 1 year ago

Fixed by #26 and commit 430a5ec. I will leave this open until it is released with #9.

KnugiHK commented 1 year ago

Released in 0.9.0.