My question is similar to google app engine app.yaml url handlers. But somehow, my question include classes.
I just recently transferred customers.py to resources/customers.py. customers.py contains a class named CustomersResources. Here is the app.yaml configuration:
- url: /resources/customers
script: resources.CustomersResources.app
I got the following error:
ImportError('%s has no attribute %s' % (handler, name))
ImportError: <module 'resources' from 'C:\xampp\htdocs\pawnsoftware\trunk\pawnsoftware-0.0.1\resources.pyc'> has no attribute CustomersResources
Edit:
Since I have a conflict with the resources directory and resources.py. I have decided to remove the file resources.py from the root directory. Now, I have the following error.
ImportError: No module named resources
The name of your class is
resources.customers.CustomersResourcesand your app is defined in theresources.customersmodule, so it would beresources.customers.app.EDIT to reflect changes in question:
It seems you have both a resources folder and a
resources.pyfile. They can’t coexist. In your resources folder you need an__init__.pyfile.