Working with AnvilX to create a Tableau extension. In the designer output I keep getting these sorts of errors, out of trexjacket.
`AttributeError: module 'anvil' has no attribute 'tableau'`
* `at app/trexjacket/model/proxies.py:5`
* `called from app/trexjacket/api.py:4`
* `called from Workflow, line 15`
Any idea what might be causing this? I’ve added trexjacket and anvil_extras to the dependencies, at the breakage is very early, still in the import section.
Code Sample:
# snip
import anvil.server
import anvil.tables as tables
import anvil.tables.query as q
from anvil import *
from anvil.tables import app_tables
from anvil_extras.non_blocking import call_async
from trexjacket.api import get_dashboard
# breaks here
It doesn’t seem to affect the app, but I am not sure.
I’ve re-done the imports to get rid of the star import, and then all seems to be working fine, eg:
# snip
import anvil
import anvil.tables as tables
import anvil.tables.query as q
from anvil.tables import app_tables
from anvil_extras.non_blocking import call_async
from trexjacket.api import get_dashboard
Which is of course different from the default template’s import pattern, so had to update in all the files we have. But at least it is now not complaining.
Actually, this didn’t work, the error came back / or I’ve missed that it didn’t go away (as it takes a little time for the Designer Output to show up…)
So the question still stands…
So in the Trex Jacket, the line that’s failing is:
from anvil import tableau
If you add that import above the trexjacket import, does that also fail?
Most often we see that failing because the Anvil X service has been removed from the app (or never added, depending on how you created the app in the first place).
Do you see the Anvil X icon on the services list along the left bar? If not, you can add it with the blue plus button:
If that doesn’t work, are you able to provide a clone link that reproduces the error?
Anvil X icon is there, and everything seems to function, except these attribute errors in the designer, in this one form. So far I don’t see anything obviously different for this form compared to others either…
So far I couldn’t create a version separately that reproduces the error, but haven’t tried it for too long. Gonna try it again and share if I have anything. But this is the most annoying part os far, the difficulty of reproduction in other AnvilX apps. I know that’s not very helpful.