-
Notifications
You must be signed in to change notification settings - Fork 86
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
A Error about JSONEncode #93
Comments
Hi, |
Hi, |
When you get errors you should post the error messages. I got several positive feedback that SOPARE runs with Python 3 incl. from myself :) |
Hi Martin,
I am still testing. Currently I am facing issues with a new Raspbian Installation (Bullseye) which uses Python 3.9 as default. My issues are not associated with sopare (as far as I can see), but with the support of my mini USB microphone. I get errors from ALSA lib that the type in the configuration is not correct. As soon as I have overcome this issue, I am able to complete my tests with sopare on Python 3+. I will then give you feedback.
Thank you very much for this super product.
Very kind regards
Kurt Feusi
… On 10 Dec 2021, at 16:10, Martin Kauss ***@***.***> wrote:
When you get errors you should post the error messages. I got several positive feedback that SOPARE runs with Python 3 incl. from myself :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#93 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AGAOSIFROISMMBMBLNPUY4TUQIJ75ANCNFSM42ETUAIA>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi, When running under python2.7 the following: Capturing wav file runs OK, but when trying o create dictionary I get error: (see following) pi@raspberrypi:~/sopare $ python2 sopare.py -c I am at a loss! Thank you for help. |
A user reported (the same?) issue and made some fixes: Not sure if this solves the issue but it's worth a test. To verify and fix this issue one need to be able to reproduce it. Please provide a step by step description and some background information about used OS/versions etc. (there are at least two Python versions in the comments). |
Hi Martin, |
You are welcome. Good to know that the fix is working. I need to install and setup a clean system to be able to verify and fix the issue without breaking Python 2 support ... maybe when and if there is some time between the holidays. |
I met a Error when running sopare/numpyjsonencoder. py. There are the code and the Error.
`
class numpyjsonencoder(json.JSONEncoder):
Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/home/pi/dev/sopare/sopare/worker.py", line 125, in run self.util.store_raw_dict_entry(self.cfg.getoption('cmdlopt', 'dict'), self.raw_character) File "/home/pi/dev/sopare/sopare/util.py", line 108, in store_raw_dict_entry json.dump(json_obj, json_file, cls=sopare.numpyjsonencoder.numpyjsonencoder) File "/usr/lib/python3.7/json/__init__.py", line 179, in dump for chunk in iterable: File "/usr/lib/python3.7/json/encoder.py", line 431, in _iterencode yield from _iterencode_dict(o, _current_indent_level) File "/usr/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict yield from chunks File "/usr/lib/python3.7/json/encoder.py", line 325, in _iterencode_list yield from chunks File "/usr/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict yield from chunks File "/usr/lib/python3.7/json/encoder.py", line 439, in _iterencode yield from _iterencode(o, _current_indent_level) File "/usr/lib/python3.7/json/encoder.py", line 431, in _iterencode yield from _iterencode_dict(o, _current_indent_level) File "/usr/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict yield from chunks File "/usr/lib/python3.7/json/encoder.py", line 438, in _iterencode o = _default(o) File "/home/pi/dev/sopare/sopare/numpyjsonencoder.py", line 38, in default return json.JSONEncoder.default(self, obj) File "/usr/lib/python3.7/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
What's wrong with this code? I use python3 from raspberry Pi.
The text was updated successfully, but these errors were encountered: