Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%load does not work #42

Open
bdzimmer opened this issue Jan 30, 2018 · 20 comments
Open

%load does not work #42

bdzimmer opened this issue Jan 30, 2018 · 20 comments
Labels

Comments

@bdzimmer
Copy link

Using the %load magic causes the runtime to hang and disconnect.

load hang

As shown above, this issue is easy to reproduce. Also, %load hangs when loading code from the namespace, i.e:

def test_func(x, y):
   return x + y

%load -n test_func
@ghost
Copy link

ghost commented Feb 9, 2018

Even i faced the same issue. I cloned a github repo using !git clone https://github.com/llSourcell/Pokemon_GAN.git. I wanted to modify a .py file inside Colab. So i used %load filename.py. But whenever i run this command, i get disconnected after some time. Please let me know if there is some other way to edit .py file without undergoing the hassle of downloading it to pc, editing and then re uploading it. Thanks in advance.

@commd
Copy link

commd commented Sep 4, 2018

%load filename.py #doesn't hang nor disconnect for me, but it doesn't seem to do anything.

@dylanmmarshall
Copy link

Aye, checking in here to say that I am also experiencing this issue. My workaround is

# in a code cell
>>> %cat file.txt

then copy output and paste to a new cell

# do some editing
>>> %%writefile file.txt

@samwit
Copy link

samwit commented Feb 13, 2019

I am also still seeing this issues, the %load command seems to run but it doesn't load anything into the cell.

@craigcitro
Copy link
Contributor

Thanks for the reports -- this is definitely a bug on our side. We haven't had a chance to tackle it yet, but when we do, we'll update this issue.

@zuuuhkrit
Copy link

Any update on this? For me %load doesn't hang anything, but it doesn't do anything either :)

@gasrodriguez
Copy link

Same for me! I cloned a repo into the notebook's kernel and wanted to embed some files into cells using %load. If the path to the file is wrong it complains and when is OK it doesn't, so load is doing "something", but nothing is shown.

@colaboratory-team
Copy link
Contributor

b/133228391

@DleanJeans
Copy link

The least you can do is create another cell with

%%writefile path/to/file.py
<file content>

when %load path/to/file.py is run.

@sbwcwso
Copy link

sbwcwso commented Feb 25, 2020

Is it not fixed yet? I have the same issue now, which is vey upset.

@wqnow
Copy link

wqnow commented Apr 10, 2020

Two years passed and the bug is still there...

@ricardodeazambuja
Copy link

@wqnow I created a library that has a function (copy2clipboard) that kind of mimics the %load magic, but it can't write directly on the cell and only copies the content to the clipboard:
https://github.com/ricardodeazambuja/colab_utils

@wqnow
Copy link

wqnow commented Apr 14, 2020

@ricardodeazambuja Thank u! I find that double clicking the file in colab will open a widget on the right of the page and you can edit the file in it.

@igorlucci
Copy link

the bug is still there...

@samuelkingsport2
Copy link

The bug still seems to be present.

@btnorman
Copy link

btnorman commented Apr 6, 2022

%load appears not to work for me

@AhmedBourouis
Copy link

same problem for me ! is there any solution for this ?

@RyuuOujiXS
Copy link

Imagine having an issue in Triage for 4 years. Talk about not giving a fuck.

@100rab-S
Copy link

100rab-S commented Jan 7, 2023

@craigcitro The bug is still present, please fix it.

@vityas
Copy link

vityas commented May 2, 2024

It appears that @craigcitro has left the colab team...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests