ModuleNotFoundError: No module named 'aquacrop.solution.solution_temperature_stress' #159
Replies: 3 comments
-
Same issue here! Running it in pure Python development mode (as described at the very bottom of https://github.com/aquacropos/aquacrop?tab=readme-ov-file ) works for me, but is not a good solution if you are worried about processing speed. |
Beta Was this translation helpful? Give feedback.
-
As far as I see, this bug relates to how Python passes features from a default class to a user-defined class. For a temporary solution, you can always: from .temperature_stress import temperature_stress Rather than: from .solution_temperature_stress import temperature_stress This means you use the same function without compiling only for this function. This is only one function and you still have other functions compiled. This could be a temporary solution. |
Beta Was this translation helpful? Give feedback.
-
Further to @Han-Su22 point, yes this is likely caused by issues with the functions not compiling properly. We are going to look into implementing an alternative to numba AOT over the coming months, but in the meantime the temporary fix proposed by @josiasritter will solve the issue as it turns off compilation. Not ideal I know in terms of processing time, but the numba AOT is unfortunately not very stable with the AquaCrop-OSPy and need a decent chunk of time to dig into why |
Beta Was this translation helpful? Give feedback.
-
Hello ,
i've just tested Aquacrop code and everything worked well before.
However , i noticed that they upgraded to the old version ( Dernière version : 3 juin 2024), but this version has resulted in a runtime problem.
Is there a way to resolve this issue?
Compiling modules... This could take some time.
Note: The compilation is only necessary the first time that the library is used.
ModuleNotFoundError Traceback (most recent call last)
in <cell line: 6>()
4 # import pandas as pd
5 # import matplotlib.pyplot as plt
----> 6 from aquacrop import AquaCropModel, Soil, Crop, InitialWaterContent
7 from aquacrop.utils import prepare_weather, get_filepath
3 frames
/usr/local/lib/python3.10/dist-packages/aquacrop/solution/harvest_index.py in
19 from .solution_water_stress import water_stress
20 from .solution_root_zone_water import root_zone_water
---> 21 from .solution_temperature_stress import temperature_stress
22 from .solution_HIadj_pre_anthesis import HIadj_pre_anthesis
23 from .solution_HIadj_post_anthesis import HIadj_post_anthesis
ModuleNotFoundError: No module named 'aquacrop.solution.solution_temperature_stress'
Beta Was this translation helpful? Give feedback.
All reactions