You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a 'server.py' script that runs a server and a webpage using flask.
I am trying to move that to pyscript but don't know completely how to do that.
I just copied all the files to the pyscript folder, moved the dependent file 'sql_functions.py' to the modules folder, and added a requirements.txt with flask as content.
But trying to run the script gives me these errors:
Exception in </config/pyscript/server.py> line 30: @app.route('/', methods=['GET']) ^ AttributeError: 'EvalFunc' object has no attribute '__name__'
Exception in </config/pyscript/server.py> line 2: import sql_functions ^ ModuleNotFoundError: No module named 'sql_functions'
Exception in </config/pyscript/server.py> line 35: @app.route('/', methods=['GET']) ^ AttributeError: 'EvalFunc' object has no attribute '__name__'
Exception in </config/pyscript/modules/sql_functions.py> line 11: base_path = os.path.dirname(os.path.realpath(__file__))+'/' ^ NameError: name '__file__' is not defined
Any help appreciated
The text was updated successfully, but these errors were encountered:
I have a 'server.py' script that runs a server and a webpage using flask.
I am trying to move that to pyscript but don't know completely how to do that.
See the source code here
I just copied all the files to the pyscript folder, moved the dependent file 'sql_functions.py' to the modules folder, and added a requirements.txt with flask as content.
But trying to run the script gives me these errors:
Any help appreciated
The text was updated successfully, but these errors were encountered: