Module not found error

Hello everyone. Fortunately, I made progress in the coding of the post DLC analysis. However, I got stuck again because I got a “module not found” error. Here is a screenshot. How can I troubleshoot this?


The problem is that I don’t have the “time_in_roi” module somewhere. I need this module for my project.

Hello @jeylau; is there a way to get passed the Module not found error? This module seems necessary for me to move on for the code.


easiest way would be to (after downloading the place it in a folder with your analysis script you and use it that way.

Hi @Konrad_Danielewski,
Thanks for the message. I did download, and I thought I placed it in a reasonable folder. Forturnately, when I pasted the code on the Qt Console, I didn’t get a “module not found” error. However, I received a syntax error instead. How come?

Even when I’m specific with the Dataframe and DLCscorer names (I tried it again), there is still a syntax error.

As the error says, there is some syntax error in line 7 in - I think it was the same for me, might be some system specific formatting of docs(?). Correct the error (probably the whole code is commented out so remove some quotation until it isn’t) and it should work.

What do you mean remove quotation? Can you please give me an example?

Open in some IDE, like PyCharm/Visual Studio Code/Spyder and check if the code looks normal. Probably quation marks are placed in a way that makes the doc look like code and code look like comments. Interpreter then tries to run the commented text like it was code and gives syntax error since it’s not code at all.

Okay. So if I open in Spyder, will I get any indication of where to edit?

Here is a screenshot of Spyder. seems to be the issue in this photo, the syntax error. How should I go about editing this?

Sorry, here is a better screenshot.

I solved the problem! I just had to copy the raw file. This time, I got no errors!

Well, the file you had before was not the python script at all. It was html code of the page with the file?