Gizmo Showcase TypeError at /developer/gizmos/

10 views
Skip to first unread message

chardi...@gmail.com

unread,
Jun 11, 2019, 6:30:09 PM6/11/19
to Tethys Platform
I'm trying to learn about Tethys through the on-line documentation.  Under the topic oftware Development Kit / Template Gizmos API / Gizmo Showcase, the documentation says to "start up your development server ... Log in and select Developer link.. Select the Gizmos developer tool"  I do all that but instead of being led to the Gizmo Showcase page, I get
TypeError at /developer/gizmos/

Here's some more of the error report:

Traceback:

File "/home/john/tethys/miniconda/envs/tethys/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/home/john/tethys/miniconda/envs/tethys/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "/home/john/tethys/miniconda/envs/tethys/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/home/john/tethys/miniconda/envs/tethys/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/john/tethys/miniconda/envs/tethys/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.                 return view_func(request, *args, **kwargs)

File "/home/john/tethys/src/tethys_gizmos/views/gizmo_showcase.py" in index
  784.     if get_geoserver_wms():

File "/home/john/tethys/src/tethys_gizmos/views/gizmo_showcase.py" in get_geoserver_wms
  35.     spatial_dataset_engines = list_spatial_dataset_engines()

File "/home/john/tethys/src/tethys_services/utilities.py" in list_spatial_dataset_engines
  214.                 password=site_spatial_dataset_service.password

File "/home/john/tethys/src/tethys_services/utilities.py" in initialize_engine_object
  76.     engine_split = engine.split('.')

Exception Type: TypeError at /developer/gizmos/
Exception Value: a bytes-like object is required, not 'str'

swainn

unread,
Jun 13, 2019, 4:29:32 PM6/13/19
to Tethys Platform
What command did you use to install Tethys?

chardi...@gmail.com

unread,
Jun 14, 2019, 12:17:44 PM6/14/19
to Tethys Platform
I have since replaced Ubuntu 18 with Ubuntu 16, and re-installed Tethys using
bash install_tethys.sh -b master --install-docker --docker-options "'-d -c geoserver'"
and it all installed smoothly, and Gizmos Showcase is accessible.  But if I run into glitches with anything down the road, I will re-install using "release" instead of "master".
When I was having trouble with Gizmos Showcase I was in Ubuntu 18, and, to tell you the truth, I had been going back and forth on a to get it to install on two different computers, and not sure what I finally had tried, "release" or "master" on that computer with that operating system.  Sorry.

swainn

unread,
Jun 14, 2019, 6:02:59 PM6/14/19
to Tethys Platform
Interesting. I develop on Ubuntu 18 with a version of master without issues, but I don't have the latest version of master currently. There has been quite a bit of activity on master in the last few months as we prepare for our release in July, so it is likely to have a few bugs.
Message has been deleted

Michael S

unread,
Jun 15, 2019, 8:37:39 PM6/15/19
to Tethys Platform
That sounds like a Python 3 error. Reminds me of this dam_inventory fix: https://github.com/tethysplatform/tethysapp-dam_inventory/blob/advanced-solution/tethysapp/dam_inventory/model.py#L155-L158

In fact, seeing this: 

File "/home/john/tethys/src/tethys_services/utilities.py" in initialize_engine_object
  76.     engine_split = engine.split('.')

Makes me almost sure that the fix is as simple as modifying that line to engine_split = engine.split('.').encode('utf-8')). The current test may be mocking this variable, that would explain why it is not caught in testing.
Reply all
Reply to author
Forward
0 new messages