C2W2 %%writefile error in Google Colab: UsageError : %%writefile is a cell magic, but the cell body is empty

Hey,

I have an issue.
When running a code:

_constants_module_file = 'constants.csv'
%%writefile {_constants_module_file}

in Jupyter in laboratory environments, everything works fine.

But when I run it in Google Colab, I get an error:
UsageError: %%writefile is a cell magic, but the cell body is empty.

I tried to fix it in different ways, but nothing works.
How to run %%writefile in Colab?

Thanks

Hi @ivan_100096
Please take a look at the following article
Hope this can help to find a workaround for the issue you have
BR

2 Likes

thanks @fabioantonini was helpful

1 Like

Great! Happy learning