-1

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 work\crud>zappa init
    Traceback (most recent call last):
      File "c:\users\dwipal shrirao\appdata\local\programs\python\python38\Lib\runpy.py", line 192, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "c:\users\dwipal shrirao\appdata\local\programs\python\python38\Lib\runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "D:\rough work\crud\.env\Scripts\zappa.exe\__main__.py", line 4, in <module>
      File "d:\rough work\crud\.env\lib\site-packages\zappa\cli.py", line 44, in <module>
        from .core import Zappa, logger, API_GATEWAY_REGIONS
      File "d:\rough work\crud\.env\lib\site-packages\zappa\core.py", line 33, in <module>
        import troposphere
      File "d:\rough work\crud\.env\lib\site-packages\troposphere\__init__.py", line 586, in <module>
        class Template(object):
      File "d:\rough work\crud\.env\lib\site-packages\troposphere\__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?

James Z
  • 12,209
  • 10
  • 24
  • 44
  • instead of just error give us https://stackoverflow.com/help/minimal-reproducible-example For instance, what python version are you running, what zappa version do you run – iklinac Aug 24 '20 at 09:40

1 Answers1

0

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.

Traycho Ivanov
  • 2,887
  • 14
  • 24