[Fixed] Internal server error - get_bytes()

When running data table backup code via uplink that has worked before, I’ve started to get an internal server error when calling media.get_bytes(). I haven’t run the backup for a few months, so I can’t say exactly when it stopped working. The error happens on the very first call to media.get_bytes().

I updated anvil-uplink to the latest version, but the internal error is still happening.

I’m hoping the internal error codes are logged somewhere that Anvil staff can get to, with more information about what caused the error. Nothing is showing in the app logs other than the successful uplink connection.

Here’s the stack track where the issue happened, starting at the call to get_bytes():

  File "C:\Users\jshaf\AppData\Roaming\Python\Python37\site-packages\anvil\_server.py", line 482, in get_bytes
    return self._fetch().get_bytes()
  File "C:\Users\jshaf\AppData\Roaming\Python\Python37\site-packages\anvil\_server.py", line 451, in _fetch
    self._fetched = anvil.server.call("anvil.private.fetch_lazy_media", self._spec)
  File "C:\Users\jshaf\AppData\Roaming\Python\Python37\site-packages\anvil\server.py", line 403, in call
    return _do_call(args, kwargs, fn_name=fn_name)
  File "C:\Users\jshaf\AppData\Roaming\Python\Python37\site-packages\anvil\server.py", line 395, in _do_call
    return _threaded_server.do_call(args, kwargs, fn_name=fn_name, live_object=live_object)
  File "C:\Users\jshaf\AppData\Roaming\Python\Python37\site-packages\anvil\_threaded_server.py", line 435, in do_call
    raise error_from_server
anvil._server.InternalError: Internal server error: efe436385a6e

Accelerated tables is off for this app, if that makes a difference.

1 Like

Thanks for reporting. Moved to bug reports and we’ll take a look.

Does the same code execute in an anvil server module?

1 Like

I’ll have to strip it down and remove the file handling parts to test (the uplink code parses the project’s yaml file to extract table and column names).

Edit: stripped down code works fine in a server module

I agreed with your answer. My problem is solved. I am very happy:blush:.

Have a nice day to all:+1:.

The Uplink backup code is still not working, any word on what might be causing this? If needed I can provide the code that’s causing the issue, and you can hook it up to any Anvil app via an Uplink key to try to reproduce the issue.

1 Like

Yes please - a code snippet will be useful so that we can reproduce.