Skip to content
Init is coming / May 19 - 23
Back

Invalid `specification` param: Specification must be one of:

  • 0
  • Functions
kaidaichaumui4401
13 May, 2025, 05:06

I'm self-hosting my appwrite instance on my Macbook, and I created a Python function using the command appwrite init functions and it outputed the below into my appwrite.json file:

TypeScript
  "functions": [
    {
      "$id": "6822c925002b757181c0",
      "name": "Combine Function",
      "runtime": "python-3.9",
      "specification": "s-1vcpu-512mb",
      "execute": ["any"],
      "events": [],
      "scopes": ["users.read"],
      "schedule": "",
      "timeout": 15,
      "enabled": true,
      "logging": true,
      "entrypoint": "src/main.py",
      "commands": "pip install -r requirements.txt",
      "path": "functions/Combine Function"
    }
  ]

However, when I try to push my function, I get the below error when I run appwrite push functions --verbose:

TypeScript
ErrorCombine Function (***)  • Invalid `specification` param: Specification must 
Error: No functions were pushed.
AppwriteException [Error]: Invalid `specification` param: Specification must be one of: 

I got this to work by switching the specification property from

TypeScript
"specification": "s-1vcpu-512mb",      

to

TypeScript
"specifications": [
  {
    "memory": 512,
    "cpus": 1,
    "enabled": true,
    "slug": "s-1vcpu-512mb"
  }
],

Is this some issue with me self-hosting, the CLI, or the function? My CLI version is 6.2.3 and my appwrite container in my docker compose file is 1.6.1

TL;DR
Developers created a Python function with the Appwrite CLI version `6.2.3`, but encountered an error when pushing it due to an invalid `specification` parameter in the `appwrite.json` file. They resolved the issue by changing the `specification` property to `specifications`.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more