question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

upload_file fails on one specific script

See original GitHub issue

Trying to upload a specific python file to the workers, through upload_file, throws an exception “Exception: object Future can’t be used in ‘await’ expression”. I’m running out of ideas of what the problem could be, which is why I need your help. But these are my current hypothesis:

  • It somehow doesn’t like that I’m uploading a script that contains potentially unwanted pandas usages, as it allows uploading the file if I remove certain apply methods (although, if I just remove some surrounding code and leave there the supposedly conflicting pandas line, it also starts working).

  • It has a certain memory limit as to the file size that I want to upload (which would be strange as the file is only 10KB and other dummy examples with several lines of code work just fine).

Here’s the full error message:

image

What I’m doing in the notebook before calling upload_file:

image

The file that I’m trying to upload:

utils.py.zip

Please help me as I’m really feeling clueless here!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mrocklincommented, Aug 6, 2019
0reactions
mrocklincommented, Aug 6, 2019

For maintainers, this was introduced when we changed yield to await in many places.

Torando coroutines do a few things better than async/await does. In particular, you can yield concurrent.futures.Future objects and things work well. The await keyword doesn’t handle this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prevent any file from uploading if a single file has error ...
I use $error variable to hold the erros, and after checking each file in a for() I tried if($error == 0) {// Upload...
Read more >
Fail to upload vugen script - Operations Bridge User Discussions
Created a vugen script and tried to upload it to BSM 9.24. I have tried both automatic detection and vugen, but I only...
Read more >
PI13745: FILE UPLOAD FAILED WHEN ADD ATTACHMENT ...
File upload failed: The server or file upload service is not responding, ... On Script Steps, choose attachment, and on Attachment View, *...
Read more >
put command - WinSCP
If only one parameter is specified, uploads the file to remote working directory. ... To upload all files in a directory, use mask...
Read more >
Debugging PHP Upload Scripts - Image Uploader 7.0 - Aurigma
In this case, please, firstly check that you specified at least one Converter, your upload script actually saves files (see the Saving Uploaded...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found