Error When Installing App In Production

32 views
Skip to first unread message

swainn

unread,
Jul 21, 2017, 4:24:46 PM7/21/17
to Tethys Platform
All: 

I'm attempting to install an app on a Tethys 2.0 production server and I'm getting the following error in the uwsgi logs:

ERROR:tethys.tethys_apps.utilities:The following error occurred while trying to import the controller function "tethys_apps.tethysapp.map_plot.controllers.home":

 Traceback (most recent call last):

  File "/home/tethys/tethys/src/tethys_apps/utilities.py", line 191, in generate_app_url_patterns

    module = __import__(module_name, fromlist=[function_name])

  File "/home/tethys/tethys/src/tethys_apps/tethysapp/map_plot/controllers.py", line 7, in <module>

    from .model import get_all_stations, get_all_stats, get_flow_data, get_NWIS_data, get_name, bias, nashsutcliffe, lognashsutcliffe, kge, pbias, correlationcoefficient, rmse, mae

ImportError: cannot import name cdec


The strange thing is that I can't find any reference to the name "cdec" anywhere in the app, and it obviously isn't on line 7. It also isn't a valid Python library on conda or pip. As far as I can tell, all of the dependencies have been installed for the app. Has anyone else seen this error before?

swainn

unread,
Jul 21, 2017, 6:00:15 PM7/21/17
to Tethys Platform
This is an issue with a dependency called ulmo. There seems to be an issue with uwsgi recognizing ulmo and possibly other dependencies in the conda environment. I checked the site-packages directory, and the ulmo module is present and its package called cdec is present, but uwsgi does not recongize, even after restarting.

ezra.j.rice

unread,
Jun 25, 2018, 2:11:12 PM6/25/18
to Tethys Platform
Nathan, I'm having a similar issue as this. I'm able to install my app in a dev environment, but when I try to install it on a production server, I get an error saying it can't import a class that is defined in my model.py file. It is able to import a different class from the model.py file.


On Friday, July 21, 2017 at 3:24:46 PM UTC-5, swainn wrote:

swainn

unread,
Jun 25, 2018, 3:14:10 PM6/25/18
to Tethys Platform
Ezra, can you post more details? What is in your models.py, where are you making the import, how are you installing in production, what is the error, etc.
Reply all
Reply to author
Forward
0 new messages