Closed svavoi closed 6 years ago
Ok thanks. I made all group names unique and could finally finish step 2! :)
svavoi@bvdgdi-svdmbap3:~/mapbs$ make -f svavoi.mk upgrade2
.build/venv/bin/c2ctool upgrade svavoi.mk --step 2
make[1]: Entering directory '/home/svavoi/mapbs'
sudo /usr/sbin/apache2ctl graceful
touch .build/apache.timestamp
make[1]: Leaving directory '/home/svavoi/mapbs'
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
================================================================
The upgrade is nearly done, now you should:
- Test your application.
To continue type:
make -f svavoi.mk upgrade5
Now I want to test the application but get the following server errors:
http://bvdgdi-svdmbap3.bs.ch/svavoi/wsgi
WebError Traceback:
⇝ IndexError: list index out of range
http://bvdgdi-svdmbap3.bs.ch/svavoi/admin
WebError Traceback:
⇝ AttributeError: 'unicode' object has no attribute 'role'
Is it possible to provide a full stack?
Entry of apache error Logfile:
[Wed Feb 22 17:19:52.212272 2017] [wsgi:error] [pid 31980] 2017-02-22 17:19:52,212 INFO [sqlalchemy.engine.base.Engine][MainThread] ROLLBACK
[Wed Feb 22 17:19:52.302324 2017] [wsgi:error] [pid 31980] 2017-02-22 17:19:52,302 INFO [sqlalchemy.engine.base.Engine][MainThread] BEGIN (implicit)
[Wed Feb 22 17:19:52.304774 2017] [wsgi:error] [pid 31980] /home/svavoi/mapbs/.build/venv/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py:219: SAWarning: Unicode type received non-unicode bind param value 'source for image/png'. (this warning may be suppressed after 10 occurrences)
[Wed Feb 22 17:19:52.304811 2017] [wsgi:error] [pid 31980] (util.ellipses_string(value),))
[Wed Feb 22 17:19:52.304962 2017] [wsgi:error] [pid 31980] 2017-02-22 17:19:52,304 INFO [sqlalchemy.engine.base.Engine][MainThread] SELECT main.ogc_server.id AS main_ogc_server_id, main.ogc_server.name AS main_ogc_server_name, main.ogc_server.description AS main_ogc_server_description, main.ogc_server.url AS main_ogc_server_url, main.ogc_server.url_wfs AS main_ogc_server_url_wfs, main.ogc_server.type AS main_ogc_server_type, main.ogc_server.image_type AS main_ogc_server_image_type, main.ogc_server.auth AS main_ogc_server_auth, main.ogc_server.wfs_support AS main_ogc_server_wfs_support, main.ogc_server.is_single_tile AS main_ogc_server_is_single_tile
[Wed Feb 22 17:19:52.305029 2017] [wsgi:error] [pid 31980] FROM main.ogc_server
[Wed Feb 22 17:19:52.305161 2017] [wsgi:error] [pid 31980] WHERE main.ogc_server.name = %(name_1)s
[Wed Feb 22 17:19:52.305366 2017] [wsgi:error] [pid 31980] 2017-02-22 17:19:52,305 INFO [sqlalchemy.engine.base.Engine][MainThread] {'name_1': 'source for image/png'}
[Wed Feb 22 17:19:52.345604 2017] [wsgi:error] [pid 31980] 2017-02-22 17:19:52,345 INFO [sqlalchemy.engine.base.Engine][MainThread] ROLLBACK
[Wed Feb 22 17:19:52.346706 2017] [wsgi:error] [pid 31980] [remote 10.81.220.213:58422] Debug at: http://bvdgdi-svdmbap3.bs.ch/svavoi/wsgi/_debug/view/1487775662
WebError Traceback:
⇝ IndexError: list index out of range
View as: Interactive | Text | XML (full)
URL: http://bvdgdi-svdmbap3.bs.ch/svavoi/wsgi
Module weberror.evalexception:429 in respond view
>> app_iter = self.application(environ, detect_start_response)
Module fanstatic.publisher:219 in __call__ view
>> return self.app(environ, start_response)
Module fanstatic.injector:54 in __call__ view
>> response = request.get_response(self.app)
Module webob.request:1299 in send view
>> application, catch_exc_info=False)
Module webob.request:1263 in call_application view
>> app_iter = application(self.environ, start_response)
Module pyramid.router:223 in __call__ view
>> response = self.invoke_subrequest(request, use_tweens=True)
Module pyramid.router:198 in invoke_subrequest view
>> response = handle_request(request)
Module c2cgeoportal.lib.cacheversion:57 in __call__ view
>> if path[1] in CACHE_PATH:
IndexError: list index out of range
WebError Traceback:
⇝ MakoRenderingException: Traceback (most recent call last): File "/home/svavoi/mapbs/.build/venv/lib/python2.7/site-packages/pyramid_mako/__init__.py", line 148, in __call__ result = template.render_unicode(**system) File "/home/svavoi/mapbs/.build/venv/lib/python2.7/site-packages/mako/template.py", line 471, in render_unicode as_unicode=True) File "/home/svavoi/mapbs/.build/venv/lib/python2.7/site-packages/mako/runtime.py", line 838, in _render **_kwargs_for_callable(callable_, data)) File "/home/svavoi/mapbs/.build/venv/lib/python2.7/site-packages/mako/runtime.py", line 873, in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File "/home/svavoi/mapbs/.build/venv/lib/python2.7/site-packages/mako/runtime.py", line 899, in _exec_template callable_(context, *args, **kwargs) File "/home/svavoi/mapbs/mapbs/templates/desktop.html", line 134, in render_body <script type="text/javascript" src="${request.route_url('desktop.js', _query=extra_params)}"></script> File "/home/svavoi/mapbs/.build/venv/lib/python2.7/site-packages/pyramid/url.py", line 269, in route_url elements, kw = route.pregenerator(self, elements, kw) File "/home/svavoi/mapbs/.build/venv/lib/python2.7/site-packages/c2cgeoportal/lib/__init__.py", line 320, in __call__ query["username"] = request.user.username AttributeError: 'unicode' object has no attribute 'username'
View as: Interactive | Text | XML (full)
URL: http://bvdgdi-svdmbap3.bs.ch/svavoi/wsgi/desktop
Module weberror.evalexception:429 in respond view
>> app_iter = self.application(environ, detect_start_response)
Module fanstatic.publisher:219 in __call__ view
>> return self.app(environ, start_response)
Module fanstatic.injector:54 in __call__ view
>> response = request.get_response(self.app)
Module webob.request:1299 in send view
>> application, catch_exc_info=False)
Module webob.request:1263 in call_application view
>> app_iter = application(self.environ, start_response)
Module pyramid.router:223 in __call__ view
>> response = self.invoke_subrequest(request, use_tweens=True)
Module pyramid.router:198 in invoke_subrequest view
>> response = handle_request(request)
Module c2cgeoportal.lib.cacheversion:62 in __call__ view
>> response = self.handler(request)
Module pyramid_debugtoolbar.toolbar:187 in toolbar_tween view
>> return handler(request)
Module pyramid.tweens:20 in excview_tween view
>> response = handler(request)
Module pyramid_tm:109 in tm_tween view
>> reraise(*exc_info)
Module pyramid_tm:88 in tm_tween view
>> response = handler(request)
Module pyramid.router:145 in handle_request view
>> view_name
Module pyramid.view:541 in _call_view view
>> response = view_callable(context, request)
Module c2cgeoportal.pyramid_:120 in new_f view
>> return f(root, request)
Module pyramid.config.views:377 in rendered_view view
>> context)
Module pyramid.renderers:450 in render_view view
>> return self.render_to_response(response, system, request=request)
Module pyramid.renderers:473 in render_to_response view
>> result = self.render(value, system_values, request=request)
Module pyramid.renderers:469 in render view
>> result = renderer(value, system_values)
Module pyramid_mako:156 in __call__ view
>> reraise(MakoRenderingException(errtext), None, exc_info[2])
Module pyramid_mako:148 in __call__ view
>> result = template.render_unicode(**system)
Module mako.template:471 in render_unicode view
>> as_unicode=True)
Module mako.runtime:838 in _render view
>> **_kwargs_for_callable(callable_, data))
Module mako.runtime:873 in _render_context view
>> _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
Module mako.runtime:899 in _exec_template view
>> callable_(context, *args, **kwargs)
Module _desktop_html:136 in render_body view
Module pyramid.url:269 in route_url view
>> elements, kw = route.pregenerator(self, elements, kw)
Module c2cgeoportal.lib:320 in __call__ view
>> query["username"] = request.user.username
(Internal information for debug purpose:
here https://github.com/camptocamp/c2cgeoportal/blob/master/c2cgeoportal/lib/cacheversion.py#L56
the request.path_info is ""
)
I just apply the modification, then can you try again? thanks :-)
.build/venv/bin/pip uninstall transifex-client
.build/venv/bin/pip install git+https://github.com/sbrunner/transifex-client.git@authenticated-proxy
rm .build/locale/de/LC_MESSAGES/gmf.po
make -f svavoi.mk .build/locale/de/LC_MESSAGES/gmf.po
I get the following error:
svavoi@bvdgdi-svdmbap3:~/mapbs$ .build/venv/bin/pip install git+https://github.com/sbrunner/transifex-client.git@authenticated-proxy
Collecting git+https://github.com/sbrunner/transifex-client.git@authenticated-proxy
Cloning https://github.com/sbrunner/transifex-client.git (to authenticated-proxy) to /tmp/pip-gA7xJI-build
Requirement already satisfied: urllib3 in ./.build/venv/lib/python2.7/site-packages (from transifex-client==0.12.3)
Requirement already satisfied: six in ./.build/venv/lib/python2.7/site-packages (from transifex-client==0.12.3)
Installing collected packages: transifex-client
Running setup.py install for transifex-client ... done
Successfully installed transifex-client-0.12.3
svavoi@bvdgdi-svdmbap3:~/mapbs$ rm .build/locale/de/LC_MESSAGES/gmf.po
svavoi@bvdgdi-svdmbap3:~/mapbs$ make -f svavoi.mk .build/locale/de/LC_MESSAGES/gmf.po
mkdir -p .build/locale/de/LC_MESSAGES/
.build/venv/bin/tx pull -l de --force
Traceback (most recent call last):
File ".build/venv/bin/tx", line 11, in <module>
load_entry_point('transifex-client==0.12.3', 'console_scripts', 'tx')()
File "/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
return ep.load()
File "/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2291, in load
return self.resolve()
File "/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/txclib/cmdline.py", line 10, in <module>
from txclib import utils
File "/home/svavoi/mapbs/.build/venv/local/lib/python2.7/site-packages/txclib/utils.py", line 114
user-agent=user_agent_identifier(),
SyntaxError: keyword can't be an expression
CONST_Makefile:751: recipe for target '.build/locale/de/LC_MESSAGES/gmf.po' failed
make: *** [.build/locale/de/LC_MESSAGES/gmf.po] Error 1
Fixed, can you try again :-)
Now it works. :-) Thanks!
Excellent, many thanks for your patience :-)
New pull request: https://github.com/transifex/transifex-client/pull/167
Running command:
make -f svavoi.mk upgrade2
Result:
My assumption is that the DB connections I defined in the
__init__.py
file are not valid anymore. Do I need to define them differently for GMF 2.x? https://github.com/camptocamp/baselstadt_mapbs/blob/GMF2x/mapbs/__init__.py#L42-L49