Question

Getting a 500 code error when deploying python function with a trigger

When I execute doctl serverless deploy . on my python function, I’m getting an error code 500.

Deployed functions ('doctl sls fn get <funcName> --url' for URL):
  - runner/scrape
Failures:
Error: While deploying while deploying trigger 'daily-trigger': Request failed with status code 500

However, when I remove the trigger from my project.yml, the project uploads fine.

My project.yml looks like the following (minus some credentials):

parameters: {}
environment: {}
packages:
  - name: runner
    shared: false
    environment: {}
    parameters: {}
    annotations: {}
    functions:
      - name: scrape
        binary: false
        main: ""
        runtime: python:3.11
        web: false
        webSecure: false
        parameters: {}
        environment:
          ENVIRONMENT: prod
        annotations: {}
        limits: {}
        triggers:
          - name: daily-trigger
            sourceType: scheduler
            sourceDetails:
              cron: "0 2 * * *"

What am I doing wrong?

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Seems to has resolved itself. Maybe a service issue.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel