Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zappa not compatible with Python3.8 #2222

Open
divyaarya opened this issue Jun 17, 2021 · 1 comment
Open

Zappa not compatible with Python3.8 #2222

divyaarya opened this issue Jun 17, 2021 · 1 comment

Comments

@divyaarya
Copy link

divyaarya commented Jun 17, 2021

Summary - Zappa version 0.52.0 not working with Python 3.8

Context

I created the virtualenv using python 3.8 and tried to deploy the environment. Its showing some error. Same thing with python3.7 is working seamlessly.

Expected Behavior

zappa deploy should start deploying the project.

Actual Behavior

zappa deploy with python3.8 version, its showing below error--
Traceback (most recent call last):
File "/home/user/Development/serverless_project/virt/demo_zappa/bin/zappa", line 5, in
from zappa.cli import handle
File "/home/user/Development/serverless_project/virt/demo_zappa/lib/python3.8/site-packages/zappa/cli.py", line 44, in
from .core import Zappa, logger, API_GATEWAY_REGIONS
File "/home/user/Development/serverless_project/virt/demo_zappa/lib/python3.8/site-packages/zappa/core.py", line 33, in
import troposphere
File "/home/user/Development/serverless_project/virt/demo_zappa/lib/python3.8/site-packages/troposphere/init.py", line 586, in
class Template(object):
File "/home/user/Development/serverless_project/virt/demo_zappa/lib/python3.8/site-packages/troposphere/init.py", line 588, in Template
'AWSTemplateFormatVersion': (basestring, False),
NameError: name 'basestring' is not defined

Steps to Reproduce(Similar steps with python3.7 are working fine)

  1. Created Django Project
  2. Created virualenv for python3.8 (virtualenv -p /usr/bin/python3.8 virt/demo_zappa/)
  3. Setup zappa_settings.json with runtime "python3.8"
  4. Executing zappa init or zappa deploy is producing errors.

Your Environment

  • Zappa version used: 0.52.0

  • Operating System and Python version: Ubuntu 18.04 LTS and Python 3.8.10

  • The output of pip freeze:
    argcomplete==1.12.3
    asgiref==3.3.4
    boto3==1.17.89
    botocore==1.20.89
    certifi==2021.5.30
    cfn-flip==1.2.3
    chardet==4.0.0
    click==8.0.1
    Django==3.2.3
    django-extensions==3.1.3
    djangorestframework==3.12.4
    durationpy==0.5
    future==0.18.2
    hjson==3.0.2
    idna==2.9
    importlib-metadata==4.5.0
    jmespath==0.10.0
    kappa==0.6.0
    pep517==0.10.0
    pip-tools==6.1.0
    placebo==0.9.0
    PyMySQL==1.0.2
    python-dateutil==2.8.1
    python-slugify==5.0.2
    pytz==2021.1
    PyYAML==5.4.1
    requests==2.25.1
    s3transfer==0.4.2
    six==1.16.0
    sqlparse==0.4.1
    text-unidecode==1.3
    toml==0.10.2
    tqdm==4.61.0
    troposphere==2.7.1
    typing-extensions==3.10.0.0
    urllib3==1.26.5
    Werkzeug==0.16.1
    wsgi-request-logger==0.4.6
    zappa==0.52.0
    zipp==3.4.1

  • Your zappa_settings.json:

{
"dev": {
"aws_region": "ap-south-1",
"django_settings": "python_zappa.settings",
"profile_name": "default",
"project_name": "python-zappa",
"runtime": "python3.8",
"s3_bucket": "",
"manage_roles": false,
"role_arn": "arn:aws:iam:::role/",
"slim_handler": false,
"delete_local_zip": true
}
}

@john-parton
Copy link

Works with troposphere==3.0.2, but there are other problems with using that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants