[Fixed] BETA: AnvilWrappedError: No module named 'anvil.tables.v2'

What I’m trying to do:
Make a server call to an Uplinked function. This is code that has been working for years…

Error message is:

AnvilWrappedError: No module named 'anvil.tables.v2'
at <frozen importlib._bootstrap>, line 965
called from <frozen importlib._bootstrap>, line 983
called from <frozen importlib._bootstrap>, line 1006
called from <frozen importlib._bootstrap>, line 219
called from <frozen importlib._bootstrap>, line 953
called from <frozen importlib._bootstrap>, line 983
called from <frozen importlib._bootstrap>, line 1006
called from C:/Python37/lib/importlib/__init__.py, line 127
called from c:/Ian/PyEnvs/3_7__01/lib/site-packages/anvil/_server.py, line 1010
called from sm_request_report_pipelined, line 62

Further lines of the traceback are from my code. This error is occurring with Firefox, Chrome, and Edge. Module sm_request_report_pipelined hasn’t changed since early May, and did not experience this error last week.

Given the top lines of the traceback, I am at a loss as to how I could have caused such an error. If it is my doing, I’d love to know how, so that I can prevent it in the future!

I am very glad to be getting solid tracebacks today, in a timely manner. This was not always the case, and I very much appreciate having them.

What I’ve tried and what’s not working:
I searched for references to “anvil.tables.v2” in this forum, in the hope of a clue, but nothing turned up.

Code Sample:

# web-service imports
import anvil.users
import anvil.tables as tables
from anvil.tables import app_tables
import anvil.server
...
def request_a_report_from_home_office_pipelined(log_entry_id, request_as_text):
    """...pipelined means, it does NOT wait for the report to be completed.
    The return value is an error message; or None, if all went well.
    """
    remote_listener_fn_name = 'enqueue_job'
    try:
        result = anvil.server.call(remote_listener_fn_name,
            log_entry_id,
            request_as_text
        )
    except anvil.server.UplinkDisconnectedError:
        return "ERROR: Remote listener function has disconnected"
    except anvil.server.NoServerFunctionError:
        return "ERROR: Remote listener function is not available."
    except anvil.server.TimeoutError:
        return "ERROR: Remote listener did not respond in time."
    else:
        return None # no exception occurred

Clone link:
Link available to Anvil personnel on request.

1 Like

I think that this refers to the Accelerated Tables.

Checking it out with Accelerated Tables turned off…

  • IDE – success
  • outside of IDE (in browser): success

Thanks, Stefano!

Now marked as BETA, in case that helps our friends find and fix the problem.

Hello @p.colbert,

Thanks for raising this. I’ve added it to our list.

1 Like

Hello @p.colbert,

We’ve released a new version of the Uplink which now knows about Accelerated Tables. The problem will be fixed when you update the anvil-uplink package.

Please let us know if you have any issues.

1 Like

The error message is gone! Just tested it yesterday. Thank you!

1 Like

Just a reminder for anyone reading this later with this problem, if you are expecting datetime to serialize a certain way, when you do this update you may experience different behavior using uplink.

Details here:

1 Like