Hi,
I am trying to call a server function after loading an ascii file (size=1038KB) with the file loader button on the client side. All this code was working fine a few hours ago, but now it fails when making the call to the function with this error .
AnvilWrappedError: module ‘numpy’ has no attribute ‘asscalar’
at /home/anvil/.env/lib/python3.10/site-packages/numpy/init.py, line 311
called from /home/anvil/.downlink-sources/downlink-2022-09-02-10-37-54/anvil/_server.py, line 983
called from /home/anvil/.downlink-sources/downlink-2022-09-02-10-37-54/anvil/_server.py, line 934
called from /home/anvil/.downlink-sources/downlink-2022-09-02-10-37-54/anvil/_server.py, line 940
called from /home/anvil/.downlink-sources/downlink-2022-09-02-10-37-54/anvil/_server.py, line 934
called from /home/anvil/.downlink-sources/downlink-2022-09-02-10-37-54/anvil/_server.py, line 999
called from /home/anvil/.downlink-sources/downlink-2022-09-02-10-37-54/anvil/_serialise.py, line 133
called from /home/anvil/.downlink-sources/downlink-2022-09-02-10-37-54/anvil_downlink_worker/full_python_worker.py, line 49
called from Mainwells, line 78
I’ve tried loading different files and sizes without success. When I search for this error on google it states that this attribute ‘asscalar’ is deprecated on versions of numpy after versions 1.16. Does this mean that the server is now running a newer version of numpy and if so how do I get around this issue.
Code snippet that is casing there at line 78 is below.
Code Sample:
def create_lasWell_fileloader_change(self, file, **event_args):
welldict = anvil.server.call('readlasfileheader',file)
pass
Thanks for any help on this issue.
Peter
Clone link:
share a copy of your app