[Solved][Pinned] ModuleNotFoundError: No module named 'cts'
fuyuyuputao opened this issue · comments
Hi, it's a very nice work. But when I trying run this code, I find an error:
When running prediction_rescaled = SCALER_REGISTRY.get(self.scaler["func"])(forward_return[0], **self.scaler["args"])
Maybe some codes missed, SCALER_REGISTRY.get(self.scaler["func"])()
should be a function, but it wasn't defined
Best wishes
Thank you
Sorry, I can't reproduce your error. The latest code seems to work well. I'm guessing it might be caused by some additional modifications. Do you have more information about your changes?
Hi, because of relative path, the raw codes can not running. So I changed some relative path:
The raw code is +1
and I changed it to -8
If I remain +1
, it will print an error:
SCALER_REGISTRY.get(self.scaler["func"])()
seem to be a re-scale function, I would appreciate if you tell me this function's abs path/full name.
Thank you very much
best wishes
The re-scale function is re_standard_transform
in basicts/data/transform.py
.
I've tested STEP on a Windows PC and the code seems to work fine as well.
Please make sure you follow the instructions in the README.
Hi, I have tried running the raw codes in ubuntu, but I found the same error as windows10. I changed SCALER_REGISTRY.get(self.scaler["func"])()
to transform.re_standard_transform by used an abs path. Fortunately,I have solved this error. Maybe, this error is caused by my device.
Thank you very much
Best wishes
You're welcome, and if you have any questions, please feel free to create a new issue.
Hi, I have tried running the raw codes in ubuntu, but I found the same error as windows10. I changed
SCALER_REGISTRY.get(self.scaler["func"])()
to transform.re_standard_transform by used an abs path. Fortunately,I have solved this error. Maybe, this error is caused by my device. Thank you very much Best wishes
Hi, why do I change 'SCALER_REGISTRY.get(self.scaler["func"])()' to transform.re_standard_transform and still report an error? The error is 'ModuleNotFoundError: No module named 'cts'. '
Hi, I have tried running the raw codes in ubuntu, but I found the same error as windows10. I changed
SCALER_REGISTRY.get(self.scaler["func"])()
to transform.re_standard_transform by used an abs path. Fortunately,I have solved this error. Maybe, this error is caused by my device. Thank you very much Best wishesHi, why do I change 'SCALER_REGISTRY.get(self.scaler["func"])()' to transform.re_standard_transform and still report an error? The error is 'ModuleNotFoundError: No module named 'cts'. '
Firstly, maybe you shoule change +1
to *
so as to suit your path.
Best wishes
嗨,我试过在ubuntu中运行原始代码,但我发现和windows10一样的错误。
SCALER_REGISTRY.get(self.scaler["func"])()
我通过使用 abs 路径更改为 transform.re_standard_transform。幸运的是,我已经解决了这个错误。也许,这个错误是由我的设备引起的。非常感谢你 最良好的祝愿你好,为什么我把'SCALER_REGISTRY.get(self.scaler["func"])()'改成transform.re_standard_transform还是报错?错误是“ModuleNotFoundError:没有名为“cts”的模块。'
Hi, sorry to bother you, but my code is indeed +1, but it's still an error.
This is weird...I can't reproduce this error in any way...
Could you provide more information about your environment?
Are you also running STEP on a Windows PC, and what is your python version?
In addition, have you tried running STEP from a Windows terminal or VSCode? (to avoid the influence of Pycharm)
You can try to change +1 to any integer so as to the changed integer can be suitd for your path.This eroor is caused by relative path
Maybe you can use the code that you uploaded to github to try running again in another device.
By the way, are you also using PyCharm? @wangzhengzhengkai
顺便问一下,你也在使用 PyCharm 吗?@wangzhengzhengkai
Yes, I am using pycharm software and I changed +1 to another integer, still error.
OK, this seems to be caused by PyCharm.
I will figure it out.
You can run the code based on Windows Terminal or VSCode.
Please make sure to run the commands in the README in the directory C:\path\to\STEP
, instead of C:\path\to\STEP\step
.
When you are running the command under the directory C:\path\to\STEP\step
, you will get the exact error in this issue.
This problem is indeed caused by PyCharm.
You can solve it by setting /path/to/STEP
(C:\path\to\STEP
on Windows) as your working directory, instead of /path/to/STEP/step
.
(Do not forget to reverse the modification you have done.)
This is because PyCharm automatically recognizes /path/to/STEP/step
as your working directory when the first time you run /path/to/STEP/step/run.py
.
By the way, I would recommend Visual Studio Code if you do not know the many configurations in PyCharm.
It's closer to a native terminal and less prone to problems.