Closed meng25meng closed 4 months ago
Hi @meng25meng, thanks for reporting this issue!
Could you please run message-ix show-versions
in your message_env
virtual environment and share the output here? Because it looks like the code cannot find a package it needs on your system.
Also, please specify which tutorial you are trying to run and whether you made any changes to it.
From a quick search online, it doesn't look like version(package)
should ever be None. There were bugs in the past where deleting e.g. /path/to/site-package/message_ix-3.8.0.dist-info/*
would cause this, but I don't suspect you've done that?
Hi @meng25meng, thanks for reporting this issue! Could you please run
message-ix show-versions
in yourmessage_env
virtual environment and share the output here? Because it looks like the code cannot find a package it needs on your system. Also, please specify which tutorial you are trying to run and whether you made any changes to it.
thankyou,asfollows:
(message_env) PS C:\Users\Administrator> message-ix show-versions
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "D:\Anaconda3\envs\message_env\Scripts\message-ix.exe\__main__.py", line 7, in <module>
File "D:\Anaconda3\envs\message_env\Lib\site-packages\click\core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Anaconda3\envs\message_env\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "D:\Anaconda3\envs\message_env\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Anaconda3\envs\message_env\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Anaconda3\envs\message_env\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Anaconda3\envs\message_env\Lib\site-packages\ixmp\cli.py", line 111, in show_versions_cmd
ixmp.show_versions()
File "D:\Anaconda3\envs\message_env\Lib\site-packages\ixmp\util\__init__.py", line 627, in show_versions
info.append((module_name, version + gl))
~~~~~~~~^~~~
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
From a quick search online, it doesn't look like
version(package)
should ever be None. There were bugs in the past where deleting e.g./path/to/site-package/message_ix-3.8.0.dist-info/*
would cause this, but I don't suspect you've done that?
我的虚拟环境里确实有您提到的这个版本,不知道是不是这个原因,刚开始安装有点不太熟悉。在虚拟环境里的如下:
![Uploading QQ图片20240229220943.png…]()
Just translate the Chinese from @meng25meng here: "I do have the version you mentioned in my virtual environment. I don’t know if this is the reason. I was a little unfamiliar with the installation at first. In the virtual environment, it is as follows:"
Okay, so message-ix show-versions
should be working inside your environment. From your screenshot, I think the error might originate from the message_ix-0.0.0.dist-info
folder being present. For comparison, the only two folder with respect to ixmp and message_ix in my site-packages are:
ixmp-3.8.1.dev9+g9b93531.dist-info
message_ix-3.8.1.dev4+g4dae41e.dist-info
You don't have to worry about the .1.dev...
part, this just comes from my specific mode of installation. I'm wondering: what happens if you manually deleted the message_ix-0.0.0.dist-info
folder and the same for ixmp
, if it exists?
I don't quite know how they got there, maybe something went wrong during installation, but they shouldn't be here either way.
感谢您的建议,我把message_ix-0.0.0.的相关包删除了,现在可以正常运行,非常感谢!
Okay, so
message-ix show-versions
should be working inside your environment. From your screenshot, I think the error might originate from themessage_ix-0.0.0.dist-info
folder being present. For comparison, the only two folder with respect to ixmp and message_ix in my site-packages are:ixmp-3.8.1.dev9+g9b93531.dist-info message_ix-3.8.1.dev4+g4dae41e.dist-info
You don't have to worry about the
.1.dev...
part, this just comes from my specific mode of installation. I'm wondering: what happens if you manually deleted themessage_ix-0.0.0.dist-info
folder and the same forixmp
, if it exists? I don't quite know how they got there, maybe something went wrong during installation, but they shouldn't be here either way.
Thanks for your advice, I have deleted the related package of message_ix-0.0.0. now it can run normally, thank you very much!
Glad this solved the problem :)
Hello, your tutorial, the last error when running to the last step is as follows: