AttributeError: module 'anvil' has no attribute 'LiveObject'

Hi there,
I’m trying to deploy my anvil app on Heroku.

I tried it directly with python buildpack on Heroku. But got this error AttributeError: module 'anvil' has no attribute 'LiveObject'

and then I tried with docker and still getting this error. my deployment was successful but I got this internal error which cause an application error in my app (on heroku)
my Procfile

web: python hss.py
worker: python hss.py

I got this in Heroku logs :

File "/app/hss.py", line 20, in <module>
 import anvil.server
 File "/app/.heroku/python/lib/python3.10/site-packages/anvil/server.py", line 7, in <module>
 from . import _server, _serialise, _threaded_server
 File "/app/.heroku/python/lib/python3.10/site-packages/anvil/_server.py", line 24, in <module>
 class LiveObjectProxy(anvil.LiveObject):
 AttributeError: module 'anvil' has no attribute 'LiveObject'
 Process exited with status 1
1 Like

I have the same problem, did you solve it?

I too faced the same issue,

While uninstalling and reinstalling the pip package, I found the solution.

pip3 uninstall anvil
pip3 uninstall anvil-uplink

Then just install anvil-uplink alone,
pip3 install anvil-uplink

3 Likes