I am working on an AWS Chalice project, and I chose peewee as the ORM for the DB we have.
When I run things locally with chalice local I can run my api with no problem, I'm able to CRUD normally.
When I deploy my microservice using chalice deploy and I go test it out on the live url, I encounter an error 500. When looking into the logs I see this message multiple times:
Traceback (most recent call last):
2023-01-03 22:39:57.665000 s98frt [ERROR] Runtime.ImportModuleError: Unable to import module 'app': No module named 'playhouse'
I cannot do poetry add playhouse, because I get the following error: Could not find a matching version of package playhouse. Strange because playhouse comes with peewee.
What can you suggest me to do to fix this?
Thank you so much
Related
i have a react site that am trying to deploy to azure app service (free tiers windows) plan.
i am using VS-Code's Azure App service extention.
when i right click deploy to web app i get the error
11:44:47 AM amn-react-app: Starting deployment...
11:44:47 AM amn-react-app: Creating zip package...
11:53:39 AM amn-react-app: Zip package size: 298 MB
11:53:40 AM: Error: An error has occurred.
where to see the deployment logs to check what happened ?
update
following the update below i was able to see logs but they still not telling details.
I use vscode create a sample react project to test.
And I found, we can check delpoyment logs on portal.
Method 1
Method 2
I also try to use rest api to get deployments info, but failed because I don't find deployment id. If you are interested, you can also try.
Web Apps - Get Deployment
I have java8 project in Google App Engine . I already deployed one version of it. Now I made some changes and trying to redeploy with same command as before:
mvn package appengine:deploy
But it always fails with message:
Failed to generate quickstart-web.xml
Any idea what to do? I don't know what happened that it suddenly stopped working. Only thing I thought it could be was that I generated indexes for datastore inside Google Shell with .yaml file (java-11 version), so it somehow messed up, but I am not really sure.
The log looks like this
com.google.appengine.tools.admin.AdminException: Unable to stage app: Failed to generate quickstart-web.xml.
at com.google.appengine.tools.admin.AppAdminImpl.stageApplication(AppAdminImpl.java:543)
at com.google.appengine.tools.admin.AppAdminImpl.stageApplicationWithDefaultResourceLimits(AppAdminImpl.java:492)
at com.google.appengine.tools.admin.AppCfg$StagingAction.execute(AppCfg.java:2508)
at com.google.appengine.tools.admin.AppCfg.executeAction(AppCfg.java:363)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:211)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:118)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:114)
Caused by: java.lang.IllegalStateException: Failed to generate quickstart-web.xml.
at com.google.appengine.tools.admin.Application.createQuickstartWebXml(Application.java:1732)
at com.google.appengine.tools.admin.Application.populateStagingDirectory(Application.java:1002)
at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:862)
at com.google.appengine.tools.admin.AppAdminImpl.stageApplication(AppAdminImpl.java:539)
... 6 more
To migrate from Java8 project to Java11 in App Engine Standard, you can follow the next Official Documentation.
I have an appengine project using golang that I haven't touched in about a year. I cannot get it to build now on the machine where it was building before. I get the following error
go-app-builder: Failed parsing input: parser: bad import "syscall" in src/golang.org/x/net/internal/nettest/rlimit_unix.go
I am running on OS X if that helps at all. I am not a Golang expert, by any stretch, and my attempts to find anything even related to this have all turned up nothing. Any thoughts?
That usage is in net/internal. You are probably importing net in your app engine project someplace, and thus doing the illegal import.
If you constrain your usage to net/http on an app engine project, you should be just fine.
I think the problem is this:
You are not permitted to import the syscall package in a Go App Engine
app for security reasons. Whatever file is importing it needs to be
changed to not do that, or be excluded from the build.
as per this
So you might want to try this workaround. If you are importing the 'os' module. It fixes this
It would be helpful if you can post your code too.
Please help me to solve this error? I'm doing this exercise on app engine (https://developers.google.com/appengine/articles/prediction_service_accounts) , but I'm stuck in step 6.2 because I raise this error(When I run the deploy operation, it is successful step 6.1):
: No module named appengine
Traceback (most recent call last):
File "/base/data/home/apps/s~01prediction/1.367567721220366691/main.py", line 29, in
from oauth2client.appengine import AppAssertionCredentials
The error in line 29 :
from oauth2client.appengine import AppAssertionCredentials
Did you run step 3.2? That should have copied some folders into prediction-demo-skeleton. You should have a folder called oauth2client inside prediction-demo-skeleton. Take a look at the folders that are inside prediction-demo-full.
ps: a good practice before deploying is to run your app using the devappserver.
The Google API Python Client now has a pre-packaged ZIP containing all dependencies that might make installation easier. See:
https://code.google.com/p/google-api-python-client/downloads/list
Select google-api-python-client-gae-1.1.zip for download. Unzip this file inside of your AppEngine app directory.
Along the lines of Sebastian's suggestion it generally is a good idea to test locally using the devappserver. In this case you should be able to get past the import issue, however AppAssertionCredentials won't actually be able to generate any access tokens until it is deployed into a production environment, so it will be of limited use for you.
I recently created my Google App Engine account, and uploaded my application, and have an instance of said app running.
I can access my app via localhost:8080 but when I try to use myappid.appspot.com I get a 500 Server Error (Of course I replace "myappid" with my apps name). This is what it says:
"Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message and the query that caused it."
Can anyone help me get the URL working? I need my team to be able to access this app from anywhere. I have no idea what could be wrong with it, I am very new to GAE. After a lot of searching all I find is people saying their appspot URL works, and want other options. But I just want my appspot URL to work first!
Some more info:
This is a Python app, using the GAE Python SDK, I am running Windows 7, and using the GAE Launcher GUI to deploy and run the app.
Thanks in advance!
EDIT: Here is the error in my Log:
: No module named flask Traceback (most recent call last): File "/base/data/home/apps/s~luxtestapp/1.362824400913245138/bootstrap.py", line 19, in from app import create_app File "/base/data/home/apps/s~luxtestapp/1.362824400913245138/app/init.py", line 10, in from flask import Flask
Apparently the app uses Flask instead of Webbapp2. Honestly I'm not too sure about it all, because this is a pre-built app that I downloaded and deployed. I didn't write it.
In the control panel for your app on appspot go to the log section.
Appengine
The see what the latest entry says. Filter to "error".
Also when you create your app (python webapp2 example) turn debugging on:
app = webapp2.WSGIApplication([
('/', MainHandler)],
debug=True)
You'll get a much more informative error screen then instead of '500'.
You need to copy the flask folder to your project folder. In general every package not supported by GAE (see list of supported libraries), must be present in the project folder.
Try setting the environment variables before/after deploy. Go to the local project folder, open bash the paste this commands: ps: Ignore the $ sign
$ set HTTP_PROXY=http://cache.example.com:3128
$ set HTTPS_PROXY=http://cache.example.com:3128
check this link out for help: cloud.google.com/appengine/docs/python/tools/uploadinganapp