So it looks like RSAKPI
is a client side module containing the RSAKPI
Form class.
You are importing Transport
from the RSKAKPI
module.
This is what is breaking on the server.
When you load the RSAKPI
module on the server
the server tries to do from anvil.js.window import navigator
But the window object doesn’t exist on the server.
The window object is the browser javascript namespace.
You have a few options.
- Move
Transport
somewhere else, likely an isolated client module that doesn’t need theanvil.js.window
object. - Don’t import
navigator
directly, instead importanvil.js
and replacenavigator.clipboard
withanvil.js.window.navigator.clipboard
- do a server side check and only import navigator if you’re not on the server
from anvil import is_server_side
if not is_server_side():
from anvil.js.window import navigator
I would probably go with the first or third option.