-
Notifications
You must be signed in to change notification settings - Fork 150
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
ModuleNotFoundError: No module named 'utils' #830
Comments
So if I understand correctly, you want to use the code snippet you posted here to read in a data file that used to work with a version of message_ix that is at least five years old. As your output of So what can you do? Alternatively, you could try to make it work using an outdated version of the code. Please note that we generally do not provide support for these versions as their are enough issues in the current code base that we want to address. Consider this alone: all Python versions that were actively supported during mid-2019 have reached end of life by now. We do not support these Python versions anymore, much less any dependency that relies on them. You yourself are using Python 3.11.8, which was released in February 2024! So please update your data to make it usable with the current version, which neither has nor needs a |
Hi @meng25meng, let me know if you need further support to close this issue. 中文也可以。 Looking forward to seeing you at the MESSAGE capacity-building workshop! |
os.chdir(path_files) A function for adding water supply technologiesdef add_water(sc, setup_file):
|
上面是一个脚本里的函数,还是不太会用,不知道如何使用函数,如果用这个函数添加各种参数的,该如何编代码呢?还是也需要按照他给出的函数代码,每次都需要上面函数代码?谢谢您的解答,如果可以,我们可以将您列为作者之一,论文将在6月前完成 |
It seems you met an error when trying to use
Based on your description, the error seems to be caused by a mismatch between the structure of your 根据您的描述,我猜测 |
就是读取表格不一定非要用教程里给出的格式是吗?原理就是只要把数据读出来,然后定义出来相关技术参数,添加到scenario中,把所需参数添加齐全,最后solve就可以了,不知道我的理解对不对,如果理解相符,我目前就想用上面那种excel形式,这样的话一种技术可以减少数据行的填充,读取代码形式可以在改进,对这个模型学习初学刚一个月,感觉有些东西还没理解透,期待您的回答 |
比如, |
可以联系上你吗?对于在这个用excel建立中国电力系统模型的时候,如果在资源层面,input和output的作用是什么呢?在每一个年份上需要对input和output输入什么数据呢?我发现他的单位是百分比形式, |
input表示此项技术需要的各种commodity投入,output表示此项技术的产出的commodity。 (图中技术为煤炭资源开采技术,ext_coal_TJ技术的input数值表示TJ地区开采的煤炭资源在全国一次煤炭能源中的占比,output数值表示TJ地区开采的煤炭资源用于二次能源转换的占比。) |
同质性最终产品(Electricity|coal)可以使用同样的technology名,并在node(region)中设置区域。 关于“煤电的电量一直显示为0” ,从截图上看sub_ppl_*的output为 |
从截图上看,已向commdodity添加了新的set(我假设对应的parameter也利用add_par成功添加了?),包含四种commodity。 为了排除是否为report功能问题。麻烦确认。 |
Let's try this first. EPS in the marginal can mean a lot of things. How is the |
Can you then check the (e.g., do all sub_ppl_* have electricity as their output? Do other gas/nuclear power plants have electricity as their output and do these techs also show zeros in their Once you are confident that these are all well built and but still see zero ACT level in coal techs, the next possible checks can be:
|
谢谢您的提醒,都限制在一个区域是在node-loc这个参数吗?每个技术在每一个各地区denode-loc都设定了,关于煤电好像缺少了燃煤价格,只有一个投资成本、运维成本、 |
但是我今天在运行的时候遇到一个报错还没有出现过, Exception: Java Exception The above exception was the direct cause of the following exception: java.lang.OutOfMemoryError Traceback (most recent call last) File D:\Anaconda3\envs\message_env\Lib\site-packages\message_ix\core.py:675, in Scenario.solve(self, model, solve_options, **kwargs) File D:\Anaconda3\envs\message_env\Lib\site-packages\ixmp\core\scenario.py:878, in Scenario.solve(self, model, callback, cb_kwargs, **model_options) File D:\Anaconda3\envs\message_env\Lib\site-packages\message_ix\models.py:200, in GAMSModel.run(self, scenario) File D:\Anaconda3\envs\message_env\Lib\site-packages\message_ix\models.py:300, in MESSAGE.enforce(scenario) File D:\Anaconda3\envs\message_env\Lib\site-packages\ixmp\core\timeseries.py:252, in TimeSeries.transact(self, message, condition, discard_on_error) File D:\Anaconda3\envs\message_env\Lib\site-packages\ixmp\util_init_.py:286, in maybe_commit(timeseries, condition, message) File D:\Anaconda3\envs\message_env\Lib\site-packages\ixmp\core\timeseries.py:203, in TimeSeries.commit(self, comment) File D:\Anaconda3\envs\message_env\Lib\site-packages\ixmp\core\timeseries.py:108, in TimeSeries._backend(self, method, *args, **kwargs) File D:\Anaconda3\envs\message_env\Lib\site-packages\ixmp\backend\base.py:55, in Backend.call(self, obj, method, *args, **kwargs) File D:\Anaconda3\envs\message_env\Lib\site-packages\ixmp\backend\jdbc.py:737, in JDBCBackend.commit(self, ts, comment) java.lang.OutOfMemoryError: java.lang.OutOfMemoryError: Java heap space |
您好。我有一个提议。 鉴于这个open issue已经过长,建议考虑使用discussion板块,将其中的问题逐个清楚地描述出来,并发布独立的discussion,便于归类、回答、标明是否已经解决。其他有相似的问题的MESSAGE使用者,也能用相关的英文关键词搜索出来,避免重复提问。(同样的,您也可以在discussion中搜索以往的相关提问。) MESSAGE开发团队人员有限,以志愿的形式回答问题,使用discussion板块的话,其他使用者也可能回答。您现在使用的是issue板块,一般用于针对MESSAGE_ix代码测试的讨论,具体应用问题并不在其范畴内。 您在discussion中提问后,可以@yiyi1991。我仍然能收到您的问题提醒。 如果这个建议可行的话,请您新建discussion并关闭此issue。 |
Originally posted by @khaeru in #826 (comment)
I had a lot of nodes, so I used excel to read the data, but my excel expression was different than it is now. Ix_type_mapping is not used to add parameters, but all parameters are listed in the same table. If I want to get back to where I am now, there's going to be a lot of trouble. So, I still want to try the older version before messageix, but it lacks the util.py file when reading data. Can I download and install this tool in the current version?
This code version should be before 2020.
Anxiously waiting for your reply, hope to get your professional guidance, thank you very much!
The text was updated successfully, but these errors were encountered: