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 is failing to execute scheduled functions with a path/name longer than 63 characters #977

Closed
erwinfeser opened this issue May 17, 2021 · 2 comments
Labels
auto-closed [Bot] Closed, details in comments no-activity [Bot] Closing soon if no new activity

Comments

@erwinfeser
Copy link

erwinfeser commented May 17, 2021

Expected Behavior

update_latest_tariff_rate_discounts function is executed periodically

Actual Behavior

Exception triggered in handler.py in import_module_and_get_function at line 235:
AttributeError: module 'updater.tasks.tariff_rate_discount' has no attribute 'update_latest_tariff_rate_di'

As you can see it is trying to run update_latest_tariff_rate_di but the correct name for that function is update_latest_tariff_rate_discounts

zappa status dev:
image

Possible Fix

I solved it for this particular case by replacing: updater.tasks.tariff_rate_discount.update_latest_tariff_rate_discounts by updater.tasks.tariff_rate_discount.update_latest in zappa_settings.json file and renaming the function

Your Environment

  • Zappa version used: 0.52.0
  • Operating System and Python version: Ubuntu 20.04 (Python 3.8.10)
  • The output of pip freeze:
affine==2.3.0
argcomplete==1.12.3
asgiref==3.3.4
astroid==2.5.6
attrs==21.2.0
awscli==1.19.73
boto3==1.17.73
botocore==1.20.73
certifi==2020.12.5
cffi==1.14.5
cfn-flip==1.2.3
chardet==4.0.0
click==7.1.2
click-plugins==1.1.1
cligj==0.7.1
codecov==2.1.11
colorama==0.4.3
coreapi==2.3.3
coreschema==0.0.4
coverage==5.5
cryptography==3.4.7
decorator==5.0.9
Deprecated==1.2.12
dj-stripe==2.4.2
Django==3.2.3
django-admin-autocomplete-filter==0.6.1
django-admin-hstore-widget==1.1.0
django-admin-interface==0.16.3
django-admin-numeric-filter==0.1.6
django-admin-rangefilter==0.6.3
django-autocomplete-light==3.8.1
django-autoslug==1.9.8
django-cities-light==3.8.1
django-ckeditor==6.0.0
django-colorfield==0.4.1
django-cors-headers==3.7.0
django-debug-toolbar==3.2.1
django-filter==2.3.0
django-flat-responsive==2.0
django-flat-theme==1.1.4
django-guardian==2.3.0
django-js-asset==1.2.2
django-json-widget==1.0.1
django-map-widgets==0.3.1
django-mptt==0.11.0
django-phone-verify==2.0.0
django-phonenumber-field==5.1.0
django-recurrence==1.10.3
django-redis==4.12.1
django-reversion==3.0.9
django-s3direct==1.1.8
django-ses==1.0.3
django-storages==1.9.1
django-taggit==1.3.0
djangorestframework==3.12.4
djangorestframework-gis==0.17
djangorestframework-mvt==0.2.5
djangorestframework-simplejwt==4.6.0
docutils==0.15.2
drf-extensions==0.6.0
drf-yasg==1.20.0
durationpy==0.5
flake8==3.9.0
forex-python==1.5
future==0.18.2
hjson==3.0.2
hubspot-api-client==3.7.2
idna==2.10
inflection==0.5.1
iniconfig==1.1.1
isort==5.8.0
itypes==1.2.0
Jinja2==3.0.0
jmespath==0.10.0
jsonfield==3.1.0
kappa==0.6.0
lazy-object-proxy==1.6.0
Markdown==3.2.1
MarkupSafe==2.0.0
mccabe==0.6.1
networkx==2.4
nexmo==2.5.2
numpy==1.20.3
packaging==20.9
pep517==0.10.0
phonenumbers==8.12.23
pip-tools==6.1.0
placebo==0.9.0
pluggy==0.13.1
progressbar2==3.53.1
psycopg2-binary==2.8.6
py==1.10.0
pyasn1==0.4.8
pycodestyle==2.7.0
pycparser==2.20
pyflakes==2.3.1
PyJWT==1.7.1
pylint==2.7.4
pylint-django==2.4.2
pylint-plugin-utils==0.6
pyparsing==2.4.7
pyshp==2.1.2
pytest==6.2.4
pytest-cov==2.11.1
pytest-django==4.2.0
python-dateutil==2.8.1
python-dotenv==0.17.1
python-slugify==5.0.2
python-utils==2.5.6
pytz==2021.1
PyYAML==5.4.1
rasterio==1.1.3
redis==3.5.3
requests==2.25.1
rsa==4.7.2
ruamel.yaml==0.17.4
ruamel.yaml.clib==0.2.2
s3transfer==0.4.2
sentry-sdk==1.0.0
simplejson==3.17.2
six==1.16.0
snuggs==1.4.7
sqlparse==0.4.1
stripe==2.56.0
text-unidecode==1.3
toml==0.10.2
tqdm==4.60.0
troposphere==2.7.1
twilio==6.58.0
Unidecode==1.2.0
uritemplate==3.0.1
urllib3==1.26.4
Werkzeug==0.16.1
wrapt==1.12.1
wsgi-request-logger==0.4.6
zappa==0.52.0
zappa-django-utils==0.4.1
  • Your zappa_settings.json:
{
  "dev": {
    "aws_region": "us-east-1",
    "django_settings": "arbo.settings.dev",
    "profile_name": "default",
    "project_name": "maps",
    "runtime": "python3.8",
    "s3_bucket": "lawiqmapsdev",
    "environment_variables": {
      "GDAL_LIBRARY_PATH": "/tmp/maps/rasterio/.libs/libgdal-63d0ced7.so.20.5.4",
      "GDAL_DATA": "/tmp/maps/rasterio/gdal_data",
      "GEOS_LIBRARY_PATH": "/tmp/maps/rasterio/.libs/libgeos_c-a68605fd.so.1.13.1",
      "PROJ_LIB": "/tmp/maps/rasterio/.libs/libproj-cd06b982.so.12.0.0"
    },
    "timeout_seconds": 900,
    "slim_handler": true,
    "cors": true,
    "memory_size": 1024,
    "lambda_concurrency": 30,
    "exception_handler": "arbo.exceptions.unhandled_exceptions",
    "events": [
      {
        "function": "updater.tasks.tariff_rate_discount.update_latest_tariff_rate_discounts",
        "expression": "rate(1 hour)"
      }
    ],
    "extra_permissions": [
      {
        "Effect": "Allow",
        "Action": [
          "ses:*"
        ],
        "Resource": "*"
      }
    ]
  }
Copy link

github-actions bot commented Apr 3, 2024

Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.

@github-actions github-actions bot added the no-activity [Bot] Closing soon if no new activity label Apr 3, 2024
Copy link

Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.

@github-actions github-actions bot added the auto-closed [Bot] Closed, details in comments label Apr 13, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-closed [Bot] Closed, details in comments no-activity [Bot] Closing soon if no new activity
Projects
None yet
Development

No branches or pull requests

1 participant