The following code works both on client and server modules, but doesn’t work on an uplink script:
>>> for row in app_tables.my_table.search()[10:15]:
... print(row)
...
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Users\stefanomenci\AppData\Local\conda\conda\envs\anvil\lib\site-packages\anvil\_server.py", line 56, in __getitem__
if slice.start < 0 or slice.stop < 0 or slice.step < 0:
TypeError: '<' not supported between instances of 'member_descriptor' and 'int'
Hrm. That’s…definitely a bug. Just checking: you have the latest version of the anvil-uplink
library, don’t you?
It looks like I have the latest:
(anvil) C:\Users\stefanomenci>pip install --upgrade anvil-uplink
Requirement already up-to-date: anvil-uplink in c:\users\stefanomenci\appdata\local\conda\conda\envs\anvil\lib\site-packages (0.3.16)
Requirement not upgraded as not directly required: ws4py==0.3.4 in c:\users\stefanomenci\appdata\local\conda\conda\envs\anvil\lib\site-packages (from anvil-uplink) (0.3.4)
Requirement not upgraded as not directly required: future in c:\users\stefanomenci\appdata\local\conda\conda\envs\anvil\lib\site-packages (from anvil-uplink) (0.16.0)
Requirement not upgraded as not directly required: argparse in c:\users\stefanomenci\appdata\local\conda\conda\envs\anvil\lib\site-packages (from anvil-uplink) (1.4.0)
Requirement not upgraded as not directly required: six in c:\users\stefanomenci\appdata\local\conda\conda\envs\anvil\lib\site-packages (from anvil-uplink) (1.11.0)
mkl-random 1.0.1 requires cython, which is not installed.
mkl-fft 1.0.0 requires cython, which is not installed.
Hi Stefano,
Sorry about this, it was a bug we had fixed recently and the fix never made it into a release. Please try the upgrade again now and let us know if it works. Thanks!
Great, thanks for the heads-up!