Error when running Anvil uplink in replit

So im trying to run some code in replit for my website
I installed anvil-uplink via pip and everything was fine but when i try to import anvil.server i get this error:

Traceback (most recent call last):
  File "main.py", line 3, in <module>
    import anvil.server
  File "/home/runner/Connect-Anvil-with-det/venv/lib/python3.8/site-packages/anvil/server.py", line 7, in <module>
    from . import _server, _serialise, _threaded_server
  File "/home/runner/Connect-Anvil-with-det/venv/lib/python3.8/site-packages/anvil/_server.py", line 25, in <module>
    class LiveObjectProxy(anvil.LiveObject):
AttributeError: module 'anvil' has no attribute 'LiveObject'``` What could the problem be, or any way to bypass this?

did you fix this?

Warm regards,

Michael

Try to go to the shell, then type:

pip uninstall anvil
pip uninstall anvil-uplink
pip install anvil-uplink

This seems to fix the automatic installation of the wrong package and correctly install the correct one.

The editor will keep showing the red wiggle, but it will work:
image

EDIT
Here is the official way:

import anvil  #upm package(anvil-uplink)
2 Likes

hi. Thanks for the reply.

When i post on replit though there is something (I think it is called ‘poetry’ ) that goes ahead and installs the other anvil module.

then nothing runs