ModuleNotFoundError: No module named ‘_thread’

I am trying to fix the error below

ModuleNotFoundError: No module named ‘_thread’.

I think it might be related to anvil.extras and the version but not sure.

Appreciate any help anyone can provide.

Could you be a little bit more specific?

See details here for how to ask a good question:

How to ask a good question

Which line is throwing the error you’re seeing?

I can’t see that it would be anvil extras, but without more details I can’t say for sure.

It’s very weird it doesn’t happen when I test run the website, but when I use the webapp in the browser accessed as a website it happens whenever I click on a button or trying to run server code. Think it might be related to the python version or something like that.

Session start time: 2024-09-27 12:36:06
Session Type: Browser Session
Error count: 2
Error messages:
No module named ‘_thread’
No module named ‘_thread’

I suspect your published environment is using basic python 3. If you can change the python version you’re using it should fix the issue.

I switched the Python Version to Python 3.10 as well as Full Python 3 and still experiencing the same issue.

What version is your published environment pointing to? Are you sure you are making changes to this version?

It sounds like the running app is using a different branch/commit to that which you’re making changes in the editor.
(given you are only seeing the error in the running app)

Click the published button, and check which version the published environment is pointing to.

I was using the latest published version. I didn’t do anything other then clear my history on the browser I was using and it started working and the error went away…strange. Thank you very much for the help. Hopefully the error doesn’t reappear.