ImportError: cannot import name 'my_function' from 'abc'

Viewed 712

trying to load python script from computer to google colab but is show me importError

enter image description here

2 Answers

Change the file name abc.py for something else, like testo.py and it will work.

from google.colab import files

upload = files.upload()

check with !ls

testo.py

Try:

import testo

testo.myfunction()

hello world !

Explanation: abc is a built-in module and you should not use that name for your modules. Check this question for more info.

Related