Unable to create template or pod with python sdk version 1.6.2

import runpod
import os


runpod.api_key = os.getenv("RUNPOD_API_KEY")

try:
    # Creating a new template with a specified name and Docker image
    new_template = runpod.create_template(name="test", image_name="runpod/base:0.1.0")
    
    # Output the created template details
    print(new_template)

except Exception as err:
    # Handling potential errors during template creation
    print(err)
    # print(err.query)


Error Output:
$ python runpod.py 
partially initialized module 'runpod' has no attribute 'create_template' (most likely due to a circular import)
module 'runpod' has no attribute 'create_template'
Solution
You called your script runpod.py, so it conflicts with the runpod module. You can't do that, give your script a different name.
Was this page helpful?