Code Monkey home page Code Monkey logo

Comments (9)

Miserlou avatar Miserlou commented on May 22, 2024

I'm unable to reproduce this error.

Live version here: https://fkd7btfxzg.execute-api.us-east-1.amazonaws.com/production

shrug

from zappa.

shakna-israel avatar shakna-israel commented on May 22, 2024

Is there a way to re-deploy the APIs from scratch, perhaps?

https://2e4go8e0ol.execute-api.us-east-1.amazonaws.com/production is the one linked, and as you can see... It fails.

from zappa.

Miserlou avatar Miserlou commented on May 22, 2024

The error indicates that it's not loading the settings properly. Can you check your zappa_settings file?

You can change the name of the environment and then call deploy again on that name. There isn't a way to un-deploy an environment yet, but that's a good idea.

from zappa.

shakna-israel avatar shakna-israel commented on May 22, 2024

I can't see anything wrong in the zappa_settings.json file.

I tried renaming it and re-deploying, but the same error occurs in tail, and the live site is still empty.

{
    "prod": {
       "s3_bucket": "shaknaisrael",
       "app_function": "shaknaisrael.app",
       "delete_zip": true,
       "debug": true
    }
}

Now, if in the same folder, I open a python REPL:

> import shaknaisrael
> shaknaisrael.app
$ <Flask 'shaknaisrael'>
> shaknaisrael.app.run()
$ * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

The local Flask app hits no errors, and I'm fairly positive that shaknaisrael.app is a WSGI object, that zappa should read fine.

from zappa.

Miserlou avatar Miserlou commented on May 22, 2024

Hm. Let me investigate more. Like I said, this is quite confounding because I was able to run this example with no problems.

Did the error happen immediately when you called deploy in the new environment? Or only upon update?

If you'd be so kind, if you could change delete_zip to false and then look in the archive for a file named 'zappa_settings.py' (py, not JSON), and paste the contents here, that would be useful as well!

from zappa.

shakna-israel avatar shakna-israel commented on May 22, 2024

Yep, those kind of errors are terrible, and I'm sorry to be the one experiencing one...

Only upon update... However, since changing the name, upon deploy.

I just re-ran it, after manually deleting all other functions, and renaming the main python file to zap_app, but still not getting anywhere.

The zappa_settings.py file reads:

# Generated by Zappa
APP_MODULE='zap_app'
APP_FUNCTION='app'
DEBUG='True'

The error is caused by the missing zap_app.py file... Which isn't missing. It was inside the archive.

In fact, the archive seems fully intact.

from zappa.

Miserlou avatar Miserlou commented on May 22, 2024

Hm. This is driving me nuts! :) Sorry that you had to be the one to find the bug, but it really helps to have opportunities to improve the software when unfortunate souls like you find errors like these.

Can you 'pip freeze' and confirm that your zappa==0.16.0?

Mine still works with update, and the zappa_settings.py file looks the same as your too. Arghhhh..

from zappa.

shakna-israel avatar shakna-israel commented on May 22, 2024

Hell.

I tried re-creating a new virtualenv, and the damn thing works.

So, comparing the two virtualenvs, I'd say that I may have found the culprit: awscli, which installed a newer version of botocore over the old one. (1.4.8 instead of 1.3.30).

from zappa.

Miserlou avatar Miserlou commented on May 22, 2024

Ah! Interesting!

Okay! Hmmmmmmmmm!

Will be mindful of this for the next release.

Thanks for reporting back, glad you got it sorted.

from zappa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.