TransWikia.com

I am getting error while while using "zappa init'

Stack Overflow Asked by Dwipal shrirao on November 26, 2020

I am using python 3.8 and zappa 0.51.0. I have installed zappa in a virtual environment and created AWS account also but when I am trying to command "zappa init" its showing error given below

    (.env) D:rough workcrud>zappa init
    Traceback (most recent call last):
      File "c:usersdwipal shriraoappdatalocalprogramspythonpython38Librunpy.py", line 192, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "c:usersdwipal shriraoappdatalocalprogramspythonpython38Librunpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "D:rough workcrud.envScriptszappa.exe__main__.py", line 4, in <module>
      File "d:rough workcrud.envlibsite-packageszappacli.py", line 44, in <module>
        from .core import Zappa, logger, API_GATEWAY_REGIONS
      File "d:rough workcrud.envlibsite-packageszappacore.py", line 33, in <module>
        import troposphere
      File "d:rough workcrud.envlibsite-packagestroposphere__init__.py", line 586, in <module>
        class Template(object):
      File "d:rough workcrud.envlibsite-packagestroposphere__init__.py", line 588, in Template
        'AWSTemplateFormatVersion': (basestring, False),
    NameError: name 'basestring' is not defined

what is happening and how I can get rid of this error?

One Answer

The builtin basestring abstract type was removed. Use str instead. The str and bytes types don’t have functionality enough in common to warrant a shared base class. The 2to3 tool (see below) replaces every occurrence of basestring with str.

As you are with python version 3.8, use str instead.

Answered by Traycho Ivanov on November 26, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP