peng-lab / BaSiCPy

MIT License
67 stars 22 forks source link

load_model fails with TypeError: unsupported operand type(s) for /: 'PosixPath' and 'ModelPrivateAttr' #133

Closed sooheon closed 1 year ago

sooheon commented 1 year ago

https://github.com/peng-lab/BaSiCPy/blob/f4eac9bbca2a4cffec01c26aeb2837b80327905c/src/basicpy/basicpy.py#L801C22-L801C22

load_model being a classmethod, cls._profiles_fname and cls._settings_fname are not instantiated when called, so are not recognized as strings and can't be added to Path with / op.

yfukai commented 1 year ago

Hi, thanks @sooheon for finding this! I believe this is already fixed in the newest version by setting the filename outside the class. I'll close this for now but please feel free to reopen this!

https://github.com/peng-lab/BaSiCPy/blob/07d438ed58b8a9ab154a41a4d57e44de6b631fe6/src/basicpy/basicpy.py#L835-L877