tg-bomze/Face-Depixelizer

TypeError: google.colab._files is undefined

Daviljoe193 opened this issue · 4 comments

I'm not very familiar with Python, so sorry for my ignorance here, and inability to explain what's probably going wrong. Running the Google Colab notebook without changing any settings causes the following error to appear...

Upload widget is only available when the cell has been executed in the current browser session. Please rerun this cell to enable.

---------------------------------------------------------------------------

MessageError                              Traceback (most recent call last)

<ipython-input-1-5483e66a8121> in <module>()
     46   get_ipython().system('rm -rf /content/pulse/input/face.png')
     47   clear_output()
---> 48   uploaded = files.upload()
     49   for fn in uploaded.keys():
     50     print('User uploaded file "{name}" with length {length} bytes'.format(

2 frames

/usr/local/lib/python3.6/dist-packages/google/colab/files.py in upload()
     62   result = _output.eval_js(
     63       'google.colab._files._uploadFiles("{input_id}", "{output_id}")'.format(
---> 64           input_id=input_id, output_id=output_id))
     65   files = _collections.defaultdict(_six.binary_type)
     66   # Mapping from original filename to filename as saved locally.

/usr/local/lib/python3.6/dist-packages/google/colab/output/_js.py in eval_js(script, ignore_result)
     37   if ignore_result:
     38     return
---> 39   return _message.read_reply_from_input(request_id)
     40 
     41 

/usr/local/lib/python3.6/dist-packages/google/colab/_message.py in read_reply_from_input(message_id, timeout_sec)
    104         reply.get('colab_msg_id') == message_id):
    105       if 'error' in reply:
--> 106         raise MessageError(reply['error'])
    107       return reply.get('data', None)
    108 

MessageError: TypeError: google.colab._files is undefined

Hello, im not expert in python but you can check this thread.https://github.com/googlecolab/colabtools/issues/5115.10.2020, 23:53, "Daviljoe193" notifications@github.com: I'm not very familiar with Python, so sorry for my ignorance here, and inability to explain what's probably going wrong. Running the Google Colab notebook without changing any settings causes the following error to appear... Upload widget is only available when the cell has been executed in the current browser session. Please rerun this cell to enable.

--------------------------------------------------------------------------- MessageError Traceback (most recent call last) in () 46 get_ipython().system('rm -rf /content/pulse/input/face.png') 47 clear_output() ---> 48 uploaded = files.upload() 49 for fn in uploaded.keys(): 50 print('User uploaded file "{name}" with length {length} bytes'.format( 2 frames /usr/local/lib/python3.6/dist-packages/google/colab/files.py in upload() 62 result = _output.eval_js( 63 'google.colab._files._uploadFiles("{input_id}", "{output_id}")'.format( ---> 64 input_id=input_id, output_id=output_id)) 65 files = _collections.defaultdict(_six.binary_type) 66 # Mapping from original filename to filename as saved locally. /usr/local/lib/python3.6/dist-packages/google/colab/output/_js.py in eval_js(script, ignore_result) 37 if ignore_result: 38 return ---> 39 return _message.read_reply_from_input(request_id) 40 41 /usr/local/lib/python3.6/dist-packages/google/colab/_message.py in read_reply_from_input(message_id, timeout_sec) 104 reply.get('colab_msg_id') == message_id): 105 if 'error' in reply: --> 106 raise MessageError(reply['error']) 107 return reply.get('data', None) 108 MessageError: TypeError: google.colab._files is undefined —You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.

Invalid link, unsure what issue you were trying to link to. If you were attempting to link to googlecolab/colabtools#17, I tried the workarounds suggested there, and for some reason that makes almost no sense to me, running the Google Colab notebook in Google Chrome instead of Firefox 68 ESR worked just fine. Guess Google allows something to run that Firefox doesn't. I assume since this is a Colab specific issue unrelated to the actual code in the notebook, this can be closed, since @tg-bomze shouldn't have to be fixing problems with Google's own platform.

@Jakoknight I also just found out you were linking to googlecolab/colabtools#51, but Githubs reply-by-email system hard added "15.10.2020, 23:53" with no spacing to that URL. Didn't find anything more helpful there, though.

hi thanks.......I tried it with chrome and got the result