paireks / dotbimpy

Python library for dotbim.
MIT License
45 stars 6 forks source link

jsonpickel error on python 3.10 #3

Closed Gorgious56 closed 2 years ago

Gorgious56 commented 2 years ago

I got an error using latest blender version 3.2 which uses python 3.10 : The dotbimpy.File.save function throws an error because of jsonpickle

  File "c:\Program Files (x86)\Steam\steamapps\common\Blender\3.2\python\lib\dotbimpy\file.py", line 29, in save
    bim_file.write(jsonpickle.encode(self, indent=4, unpicklable=False))
TypeError: encode() got an unexpected keyword argument 'indent'
paireks commented 2 years ago

Hi @Gorgious56, I run the dotbimpy's unit tests on a Python 3.10 and it seems to work.

I got some errors with latest blender version some time ago as well, but it was not due to jsonpickle itself or dotbimpy, but the fact that the installation method of dotbimpy that we're using currently for add-on is messing up with the new interpreter and existing libraries already installed for blender interpreter (like numpy) probably. I'm not sure if it's also the case here. If you have any ideas - let me know.

paireks commented 2 years ago

I found out that in setup file numpy was not in requirements, which could cause something. Please upgrade dotbimpy to newest one and have a look ;)

Gorgious56 commented 2 years ago

ooh nice thanks for the swift fix ! I'll check it out