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

Issues on importing functions from model.py #1

Open
Benminoungou opened this issue Jan 24, 2021 · 0 comments
Open

Issues on importing functions from model.py #1

Benminoungou opened this issue Jan 24, 2021 · 0 comments

Comments

@Benminoungou
Copy link

I'm trying to install SWATOnline in my computer. When I want to run this application, I got the error bellow:

ERROR:tethys.app_base:The following error occurred while trying to import the controller function "barrage_bagre.controllers.home":
Traceback (most recent call last):
File "C:\Users\minou\Anaconda3\envs\tethys\lib\site-packages\tethys_apps\base\app_base.py", line 76, in _resolve_ref_function
module = import(module_name, fromlist=[function_name])
File "c:\users\minou\tethysdev\tethysapp-barrage_bagre\tethysapp\barrage_bagre\controllers.py", line 6, in
from .model import *
RuntimeError: Model class tethysapp.barrage_bagre.model.Shapefiles doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

ERROR:tethys.tethys_apps.harvester:App tethysapp.barrage_bagre not loaded because of an issue with loading urls:
Traceback (most recent call last):
File "C:\Users\minou\Anaconda3\envs\tethys\lib\site-packages\tethys_apps\harvester.py", line 267, in _harvest_app_instances
app_instance.url_patterns
File "C:\Users\minou\Anaconda3\envs\tethys\lib\site-packages\tethys_apps\base\app_base.py", line 197, in url_patterns
controller_function = self._resolve_ref_function(url_map.controller, 'controller', is_extension)
File "C:\Users\minou\Anaconda3\envs\tethys\lib\site-packages\tethys_apps\base\app_base.py", line 81, in _resolve_ref_function
raise e
File "C:\Users\minou\Anaconda3\envs\tethys\lib\site-packages\tethys_apps\base\app_base.py", line 76, in _resolve_ref_function
module = import(module_name, fromlist=[function_name])
File "c:\users\minou\tethysdev\tethysapp-barrage_bagre\tethysapp\barrage_bagre\controllers.py", line 6, in
from .model import *
File "c:\users\minou\tethysdev\tethysapp-barrage_bagre\tethysapp\barrage_bagre\model.py", line 10, in
class Shapefiles(models.Model):
File "C:\Users\minou\Anaconda3\envs\tethys\lib\site-packages\django\db\models\base.py", line 111, in new
"INSTALLED_APPS." % (module, name)
RuntimeError: Model class tethysapp.barrage_bagre.model.Shapefiles doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

I don't where I'm wrong. Could someone help me to solve this problem?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant