I Uploaded a python script into my Google Drive, and download it into Google Colab by:
!wget "https://drive.google.com/[URL]" -O "script.py"
After downloading, when I import function from script in a cell in Google Colab:
from script.py import my_fun
I get the error:
File "/content/script.py", line 2
<!DOCTYPE html>
^
SyntaxError: invalid syntax
When I check the content of "script.py", it is similar to a HTML file not python script. Is there anyway to download python script to Google Colab?
Is there any chance that the Google Drive URL that I use is wrong?
How I get URL in Google Drive:
- Right click on the script file in Google Drive
- Select "Get Link"
- I select my company group and select "viewer" permission.
- Click "Copy Link"
Thank you for reading my question.