You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
from pythermalcomfort.models import pmv_ppd
File "AppData\Local\Programs\Python\Python311\Lib\site-packages\pythermalcomfort\__init__.py", line 3, in <module>
from pythermalcomfort.models import *
File "AppData\Local\Programs\Python\Python311\Lib\site-packages\pythermalcomfort\models.py", line 28, in <module>
from pythermalcomfort.jos3_functions import thermoregulation as threg
File "AppData\Local\Programs\Python\Python311\Lib\site-packages\pythermalcomfort\jos3_functions\thermoregulation.py", line 17, in <module>
from pythermalcomfort.jos3_functions import construction as cons
File "AppData\Local\Programs\Python\Python311\Lib\site-packages\pythermalcomfort\jos3_functions\construction.py", line 16, in <module>
from pythermalcomfort.jos3_functions.parameters import Default
File "AppData\Local\Programs\Python\Python311\Lib\site-packages\pythermalcomfort\jos3_functions\parameters.py", line 20, in <module>
@dataclass
^^^^^^^^^
File "AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 1230, in dataclass
return wrap(cls)
^^^^^^^^^
File "AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 1220, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'numpy.ndarray'> for field local_bsa is not allowed: use default_factory
When pythermalcomfort version is 2.8.4 or 2.8.3 this error occurs. 2.8.2 and 2.8.1 no issue.
Desktop
OS: Windows 10 Enterprise 19045.3448
Visual Studio Code: 1.83.0
Interpreter: Python 3.11.6 x64
Normally, I was using version pythermalcomfort 2.8.1, but when I looked to check for the latest updates and installed the new version, I encountered this error. The latest version where I do not get any errors is 2.8.2.
Additionally, if you are using Python 3.12.0 version, pythermalcomfort is not installed. This is a different error. I removed python 3.12.0 and install 3.11.6. This is a completely independent and different error from above, I just mentioned it as additional information.
The text was updated successfully, but these errors were encountered:
Python 3.11 and 3.12 are not yet supported in pythermalcomfort.
Python 3.10
Thank you very much for reporting this issue. I have created a new virtual environment using Python 3.10 and then installed pythermalcomfort with this command:
pip install pythermalcomfort
This installs pythermalcomfort-2.8.4. However, I did not get any error after running the following code:
I created a virtual environment with Python 3.12 and I confirm that I also cannot install pythermalcomfort.
Python 3.11
I created a virtual environment with Python 3.11 and I confirm that I am getting the same error as you.
I, therefore, suggest that you use Python 3.10 while I find a solution to the problem. I hope this works for you and this is not causing too many issues.
I believe I was able to fix this issue and in the future pythermalcomfort should be compatible with version 3.11. I am tagging @AkihisaNomoto who wrote the dataclass code.
Aki, I fixed the issue by changing the code as follows:
Hi. This is my first comment. I'm not sure if I'm posting in the right place. I apologize in advance if I'm making a mistake.
When I run below code (or any code with pythermalcomfort)
I got the below output;
When pythermalcomfort version is 2.8.4 or 2.8.3 this error occurs. 2.8.2 and 2.8.1 no issue.
Desktop
Normally, I was using version pythermalcomfort 2.8.1, but when I looked to check for the latest updates and installed the new version, I encountered this error. The latest version where I do not get any errors is 2.8.2.
Additionally, if you are using Python 3.12.0 version, pythermalcomfort is not installed. This is a different error. I removed python 3.12.0 and install 3.11.6. This is a completely independent and different error from above, I just mentioned it as additional information.
The text was updated successfully, but these errors were encountered: