|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
[Fwd: Re: mf-layer issue]Hi Eric, > I don't know why you're getting this error. > > A couple of things though: > > You don't run paster from the virtual env. Is there any reason for > this? For some reason, paster.exe didn't get created in my vpython/Scripts so I figured I'd use my C:\Python25 (system) one since the virtualenv I created relies on my system Python if I understand correctly (no --no-site-packages option used when creating the virtualenv). I've redone a vritualenv with the --no-site-packages (see below) where everything seems to be set properly (e.g. all scripts and all site-packages in my virtuelanev) but I still get the same error. > If you've followed the instructions, Pylons and Paste should be > installed on the virtual env. Maybe you had Paste already installed in > the main system-global Python env, so it wasn't in the virtual env > when you easy_install MapFish. But still it'd make more sense (and > might even correct things) if you run paster from the virtual env. Right. See below. > > Based on the generated code snippet you pasted in your email, it looks > you're not using MapFish trunk. If you want to do editing you'll need > trunk. For now I just want to get the machine to work ;-). If I understand correctly, I can create another server instance by pointing to another mfbase ? I intended to play with a couple of sandboxes or branches on your svn. Does the client dir need to be on a web server document root for that ? Can I 'svn co' in some arbitrary location and point paster create's mapfishclientmfbasepath to that arbitrary location that is not a web server document root ? I figure I can do that with paster. > > One last comment (unrelated to your issue): why is your user project > tree in the virtual env's lib dir? It'd make more sense to have > outside the virtual env since it's not related to the Python > installation. Well it's just a comment, you're free to put wherever > you want :) Right. See below for my complete set up. === New setup BEGIN === WITHOUT --no-site-packages : C:\>c:\Python25\Scripts\virtualenv vpython2 New python executable in vpython2\Scripts\python.exe Installing setuptools..............done. C:\vpython2\Scripts>c:\vpython2\Scripts\easy_install -f http://dev.camptocamp.com/packages/eggs/ MapFish Searching for MapFish Reading http://dev.camptocamp.com/packages/eggs/ Best match: MapFish 0.2 Downloading http://dev.camptocamp.com/packages/eggs/MapFish-0.2-py2.5.egg Processing MapFish-0.2-py2.5.egg creating c:\vpython2\lib\site-packages\MapFish-0.2-py2.5.egg Extracting MapFish-0.2-py2.5.egg to c:\vpython2\lib\site-packages Adding MapFish 0.2 to easy-install.pth file Installed c:\vpython2\lib\site-packages\mapfish-0.2-py2.5.egg Processing dependencies for MapFish Finished processing dependencies for MapFish CONCLUSION : even pointing to the virtualenv easy_install, I get the system Python MapFish install. There's nothing in my virtualenv, so it should build MapFish and all its egg dependencies, which it does not. WITH --no-site-packages : C:\>c:\Python25\Scripts\virtualenv vpython3 --no-site-packages New python executable in vpython3\Scripts\python.exe Installing setuptools..............done. C:\vpython3\Scripts>activate.bat (vpython3) C:\vpython3\Scripts> (vpython3) C:\vpython3\Scripts>c:\vpython3\Scripts\easy_install -f http://dev.camptocamp.com/packages/eggs/ MapFish Searching for MapFish Reading http://dev.camptocamp.com/packages/eggs/ Best match: MapFish 0.2 Downloading http://dev.camptocamp.com/packages/eggs/MapFish-0.2-py2.5.egg Processing MapFish-0.2-py2.5.egg creating c:\vpython3\lib\site-packages\MapFish-0.2-py2.5.egg Extracting MapFish-0.2-py2.5.egg to c:\vpython3\lib\site-packages Adding MapFish 0.2 to easy-install.pth file Installed c:\vpython3\lib\site-packages\mapfish-0.2-py2.5.egg Processing dependencies for MapFish Searching for GeoJSON==1.0a3 Reading http://pypi.python.org/simple/GeoJSON/ Couldn't find index page for 'GeoJSON' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://pypi.python.org/simple/ Reading http://pypi.python.org/simple/geojson/ Reading http://trac.gispython.org/projects/PCL/wiki/GeoJSON Best match: geojson 1.0a3 Downloading http://pypi.python.org/packages/source/g/geojson/geojson-1.0a3.tar.gz#md5=b06e196e3ede42d238c7605d14419221 Processing geojson-1.0a3.tar.gz Running geojson-1.0a3\setup.py -q bdist_egg --dist-dir c:\docume~1 \geodev\locals~1\temp\easy_install-wcdwxz\geojson-1.0a 3\egg-dist-tmp-eglbnh zip_safe flag not set; analyzing archive contents... Adding geojson 1.0a3 to easy-install.pth file Installed c:\vpython3\lib\site-packages\geojson-1.0a3-py2.5.egg Searching for Shapely==1.0.3 Reading http://pypi.python.org/simple/Shapely/ Reading http://trac.gispython.org/lab/wiki/Shapely Reading http://trac.gispython.org/projects/PCL/wiki/Shapely Reading http://trac.gispython.org/projects/PCL/wiki/ShapeLy Best match: Shapely 1.0.3 Downloading http://pypi.python.org/packages/any/S/Shapely/Shapely-1.0.3.win32.exe#md5=77dd976ffec6fe595289cf3555a51ca8 Processing Shapely-1.0.3.win32.exe WARNING: can't process DATA/DLLs/geos.dll shapely.geos: module references __file__ creating 'c:\docume~1\geodev\locals~1\temp\easy_install-vswxkg \Shapely-1.0.3-py2.5-win32.egg' and adding 'c:\docume~1\ge odev\locals~1\temp\easy_install-vswxkg \Shapely-1.0.3-py2.5-win32.egg.tmp' to it creating c:\vpython3\lib\site-packages\Shapely-1.0.3-py2.5-win32.egg Extracting Shapely-1.0.3-py2.5-win32.egg to c:\vpython3\lib \site-packages Adding Shapely 1.0.3 to easy-install.pth file Installed c:\vpython3\lib\site-packages\shapely-1.0.3-py2.5-win32.egg Searching for Pylons==0.9.6.1 Reading http://pypi.python.org/simple/Pylons/ Reading http://www.pylonshq.com/ Reading http://pylons.groovie.org/ Best match: Pylons 0.9.6.1 Downloading http://pypi.python.org/packages/source/P/Pylons/Pylons-0.9.6.1.tar.gz#md5=1341f0ab5680742ff1caa80da10751b4 Processing Pylons-0.9.6.1.tar.gz Running Pylons-0.9.6.1\setup.py -q bdist_egg --dist-dir c:\docume~1 \geodev\locals~1\temp\easy_install-uvd_d4\Pylons-0.9. 6.1\egg-dist-tmp-09t0gr Adding pylons 0.9.6.1 to easy-install.pth file Installed c:\vpython3\lib\site-packages\pylons-0.9.6.1-py2.5.egg Reading http://www.pylonshq.com/download/ Searching for SQLAlchemy==0.4.5 Reading http://pypi.python.org/simple/SQLAlchemy/ Reading http://www.sqlalchemy.org Best match: SQLAlchemy 0.4.5 Downloading http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.4.5.tar.gz#md5=ebd41cfb27a8d8b4e2a18192b6af ad95 Processing SQLAlchemy-0.4.5.tar.gz Running SQLAlchemy-0.4.5\setup.py -q bdist_egg --dist-dir c:\docume~1 \geodev\locals~1\temp\easy_install-wwjgax\SQLAlchem y-0.4.5\egg-dist-tmp-zyclbt zip_safe flag not set; analyzing archive contents... sqlalchemy.databases.mysql: module MAY be using inspect.stack Adding sqlalchemy 0.4.5 to easy-install.pth file Installed c:\vpython3\lib\site-packages\sqlalchemy-0.4.5-py2.5.egg Searching for simplejson Best match: simplejson 1.7.1 Downloading http://pylons.cachefly.net/download/0.9.6.2/simplejson-1.7.1-py2.5.egg Processing simplejson-1.7.1-py2.5.egg Moving simplejson-1.7.1-py2.5.egg to c:\vpython3\lib\site-packages Adding simplejson 1.7.1 to easy-install.pth file Installed c:\vpython3\lib\site-packages\simplejson-1.7.1-py2.5.egg Searching for Mako>=0.1.8 Best match: Mako 0.1.8 Downloading http://pylons.cachefly.net/download/0.9.6.2/Mako-0.1.8.tar.gz Processing Mako-0.1.8.tar.gz Running Mako-0.1.8\setup.py -q bdist_egg --dist-dir c:\docume~1\geodev \locals~1\temp\easy_install-a4ze2z\Mako-0.1.8\egg- dist-tmp-nxptgs Adding mako 0.1.8 to easy-install.pth file Installed c:\vpython3\lib\site-packages\mako-0.1.8-py2.5.egg Searching for nose>=0.9.3 Reading http://pypi.python.org/simple/nose/ Reading http://somethingaboutorange.com/mrl/projects/nose/ Best match: nose 0.10.3 Downloading http://somethingaboutorange.com/mrl/projects/nose/nose-0.10.3.tar.gz Processing nose-0.10.3.tar.gz Running nose-0.10.3\setup.py -q bdist_egg --dist-dir c:\docume~1\geodev \locals~1\temp\easy_install-ncb5mj\nose-0.10.3\eg g-dist-tmp-rrmm5n zip_safe flag not set; analyzing archive contents... nose.importer: module references __file__ nose.importer: module references __path__ nose.inspector: module MAY be using inspect.findsource nose.loader: module references __path__ nose.suite: module references __path__ nose.util: module references __file__ nose.ext.dtcompat: module references __file__ nose.ext.dtcompat: module MAY be using inspect.getsourcefile nose.plugins.cover: module references __file__ nose.plugins.doctests: module references __file__ Adding nose 0.10.3 to easy-install.pth file Installing nosetests-script.py script to C:\vpython3\Scripts Installing nosetests.exe script to C:\vpython3\Scripts Installed c:\vpython3\lib\site-packages\nose-0.10.3-py2.5.egg Searching for decorator>=2.1.0 Reading http://pypi.python.org/simple/decorator/ Reading http://www.phyast.pitt.edu/~micheles/python/documentation.html Best match: decorator 2.3.1 Downloading http://www.phyast.pitt.edu/~micheles/python/decorator-2.3.1.zip Processing decorator-2.3.1.zip Running setup.py -q bdist_egg --dist-dir c:\docume~1\geodev\locals~1 \temp\easy_install-3a5a9m\egg-dist-tmp-_8lyay Adding decorator 2.3.1 to easy-install.pth file Installed c:\vpython3\lib\site-packages\decorator-2.3.1-py2.5.egg Searching for FormEncode>=0.7 Best match: FormEncode 0.7.1 Downloading http://pylons.cachefly.net/download/0.9.6.2/FormEncode-0.7.1.tar.gz Processing FormEncode-0.7.1.tar.gz Running FormEncode-0.7.1\setup.py -q bdist_egg --dist-dir c:\docume~1 \geodev\locals~1\temp\easy_install-tdcmwg\FormEncod e-0.7.1\egg-dist-tmp-bvpy8x warning: no files found matching '*.py' under directory '.' warning: no files found matching '*.html' under directory 'docs' no previously-included directories found matching '**\.svn' zip_safe flag not set; analyzing archive contents... formencode.fields: module references __file__ formencode.util.doctest24: module references __file__ formencode.util.doctest24: module MAY be using inspect.getsourcefile Adding formencode 0.7.1 to easy-install.pth file Installed c:\vpython3\lib\site-packages\formencode-0.7.1-py2.5.egg Searching for PasteScript>=1.3.6 Best match: PasteScript 1.3.6 Downloading http://pylons.cachefly.net/download/0.9.6.2/PasteScript-1.3.6.tar.gz Processing PasteScript-1.3.6.tar.gz Running PasteScript-1.3.6\setup.py -q bdist_egg --dist-dir c:\docume~1 \geodev\locals~1\temp\easy_install-flw3ak\PasteScr ipt-1.3.6\egg-dist-tmp-auzvl1 Adding pastescript 1.3.6 to easy-install.pth file Installing paster script to C:\vpython3\Scripts Installing paster-script.py script to C:\vpython3\Scripts Installing paster.exe script to C:\vpython3\Scripts Installed c:\vpython3\lib\site-packages\pastescript-1.3.6-py2.5.egg Searching for PasteDeploy>=1.3.1 Best match: PasteDeploy 1.3.1 Downloading http://pylons.cachefly.net/download/0.9.6.2/PasteDeploy-1.3.1.tar.gz Processing PasteDeploy-1.3.1.tar.gz Running PasteDeploy-1.3.1\setup.py -q bdist_egg --dist-dir c:\docume~1 \geodev\locals~1\temp\easy_install-cxgngj\PasteDep loy-1.3.1\egg-dist-tmp-dnppcb warning: no files found matching 'docs\*.html' warning: no previously-included files found matching 'docs\rebuild' Adding pastedeploy 1.3.1 to easy-install.pth file Installed c:\vpython3\lib\site-packages\pastedeploy-1.3.1-py2.5.egg Searching for Paste>=1.4 Best match: Paste 1.4.2 Downloading http://pylons.cachefly.net/download/0.9.6.2/Paste-1.4.2.tar.gz Processing Paste-1.4.2.tar.gz Running Paste-1.4.2\setup.py -q bdist_egg --dist-dir c:\docume~1\geodev \locals~1\temp\easy_install-lkmy5w\Paste-1.4.2\eg g-dist-tmp-pdv_wr Adding paste 1.4.2 to easy-install.pth file Installed c:\vpython3\lib\site-packages\paste-1.4.2-py2.5.egg Searching for Beaker>=0.7.5 Best match: Beaker 0.7.5 Downloading http://pylons.cachefly.net/download/0.9.6.2/Beaker-0.7.5.tar.gz Processing Beaker-0.7.5.tar.gz Running Beaker-0.7.5\setup.py -q bdist_egg --dist-dir c:\docume~1\geodev \locals~1\temp\easy_install-utqp2l\Beaker-0.7.5\ egg-dist-tmp-yzran8 Adding beaker 0.7.5 to easy-install.pth file Installed c:\vpython3\lib\site-packages\beaker-0.7.5-py2.5.egg Searching for WebHelpers>=0.3.2 Best match: WebHelpers 0.3.2 Downloading http://pylons.cachefly.net/download/0.9.6.2/WebHelpers-0.3.2.tar.gz Processing WebHelpers-0.3.2.tar.gz Running WebHelpers-0.3.2\setup.py -q bdist_egg --dist-dir c:\docume~1 \geodev\locals~1\temp\easy_install-qsidtp\WebHelper s-0.3.2\egg-dist-tmp-hvljpc Adding webhelpers 0.3.2 to easy-install.pth file Installed c:\vpython3\lib\site-packages\webhelpers-0.3.2-py2.5.egg Searching for Routes>=1.7 Best match: Routes 1.7.3 Downloading http://pylons.cachefly.net/download/0.9.6.2/Routes-1.7.3-py2.5.egg Processing Routes-1.7.3-py2.5.egg creating c:\vpython3\lib\site-packages\Routes-1.7.3-py2.5.egg Extracting Routes-1.7.3-py2.5.egg to c:\vpython3\lib\site-packages Adding Routes 1.7.3 to easy-install.pth file Installed c:\vpython3\lib\site-packages\routes-1.7.3-py2.5.egg Finished processing dependencies for MapFish CONCLUSION : the --no-site-packages directive apparently forced the dependencies to be built. Or is it that I wasn't in my vpython2 (so PATH was my system Python first) ? Also notice : shapely warning. (vpython3) C:\>c:\vpython3\Scripts\paster create --overwrite --no-interactive --template=mapfish MFYM mapfishclientmfbas epath=c:\MapFish\client\mfbase Selected and implied templates: pylons#pylons Pylons application template mapfish#mapfish Template for creating a basic MapFish project Variables: egg: MFYM mapfishclientmfbasepath: c:\MapFish\client\mfbase package: mfym project: MFYM Creating template pylons Creating directory .\MFYM Recursing into +egg+.egg-info Creating .\MFYM\MFYM.egg-info/ Copying paste_deploy_config.ini_tmpl_tmpl to .\MFYM\MFYM.egg-info \paste_deploy_config.ini_tmpl Recursing into +package+ Creating .\MFYM\mfym/ Copying __init__.py_tmpl to .\MFYM\mfym\__init__.py Recursing into config Creating .\MFYM\mfym\config/ Copying __init__.py_tmpl to .\MFYM\mfym\config\__init__.py Copying environment.py_tmpl to .\MFYM\mfym\config\environment.py Copying middleware.py_tmpl to .\MFYM\mfym\config\middleware.py Copying routing.py_tmpl to .\MFYM\mfym\config\routing.py Recursing into controllers Creating .\MFYM\mfym\controllers/ Copying __init__.py_tmpl to .\MFYM\mfym\controllers\__init__.py Copying error.py_tmpl to .\MFYM\mfym\controllers\error.py Copying template.py_tmpl to .\MFYM\mfym\controllers\template.py Recursing into lib Creating .\MFYM\mfym\lib/ Copying __init__.py_tmpl to .\MFYM\mfym\lib\__init__.py Copying app_globals.py_tmpl to .\MFYM\mfym\lib\app_globals.py Copying base.py_tmpl to .\MFYM\mfym\lib\base.py Copying helpers.py_tmpl to .\MFYM\mfym\lib\helpers.py Recursing into model Creating .\MFYM\mfym\model/ Copying __init__.py_tmpl to .\MFYM\mfym\model\__init__.py Recursing into public Creating .\MFYM\mfym\public/ Copying index.html_tmpl to .\MFYM\mfym\public\index.html Recursing into templates Creating .\MFYM\mfym\templates/ Recursing into tests Creating .\MFYM\mfym\tests/ Copying __init__.py_tmpl to .\MFYM\mfym\tests\__init__.py Recursing into functional Creating .\MFYM\mfym\tests\functional/ Copying __init__.py_tmpl to .\MFYM\mfym\tests\functional \__init__.py Copying test_models.py_tmpl to .\MFYM\mfym\tests\test_models.py Copying websetup.py_tmpl to .\MFYM\mfym\websetup.py Copying MANIFEST.in_tmpl to .\MFYM\MANIFEST.in Copying README.txt_tmpl to .\MFYM\README.txt Copying development.ini_tmpl to .\MFYM\development.ini Recursing into docs Creating .\MFYM\docs/ Copying index.txt_tmpl to .\MFYM\docs\index.txt Copying setup.cfg_tmpl to .\MFYM\setup.cfg Copying setup.py_tmpl to .\MFYM\setup.py Copying test.ini_tmpl to .\MFYM\test.ini Creating template mapfish Recursing into +package+ Recursing into model Copying __init__.py_tmpl to .\MFYM\mfym\model\__init__.py Copying development.ini_tmpl to .\MFYM\development.ini Copying layers.ini_tmpl to .\MFYM\layers.ini Running C:\vpython3\Scripts\python.exe setup.py egg_info Adding Pylons to paster_plugins.txt Adding WebHelpers to paster_plugins.txt Adding MapFish to paster_plugins.txt [After the development.ini and layers.ini modifications are done] (vpython3) C:\>cd MFYM And now, the same error : (vpython3) C:\MFYM>c:\vpython3\Scripts\paster mf-layer gpco Creating C:\MFYM\mfym\controllers\gpco.py Creating C:\MFYM\mfym\tests\functional\test_gpco.py An error occurred. An unknown error occurred. need more than 1 value to unpack === New setup END === OK so I give it another go this time by building the eggs from the server code on svn : === New setup2 BEGIN === C:\>c:\Python25\Scripts\virtualenv vpython5 --no-site-packages New python executable in vpython5\Scripts\python.exe Installing setuptools..............done. C:\vpython5\Scripts>activate.bat (vpython5) C:\vpython5\Scripts>cd c:\MapFish\server (vpython5) C:\MapFish\server>cd python (vpython5) C:\MapFish\server\python>c:\vpython5\Scripts\python setup.py install running install running bdist_egg running egg_info writing requirements to MapFish.egg-info\requires.txt writing MapFish.egg-info\PKG-INFO writing top-level names to MapFish.egg-info\top_level.txt writing dependency_links to MapFish.egg-info\dependency_links.txt writing entry points to MapFish.egg-info\entry_points.txt writing manifest file 'MapFish.egg-info\SOURCES.txt' installing library code to build\bdist.win32\egg running install_lib running build_py copying mapfish\controllers\auth_proxy.py -> build\lib\mapfish \controllers creating build\bdist.win32\egg creating build\bdist.win32\egg\mapfish copying build\lib\mapfish\commands.py -> build\bdist.win32\egg\mapfish creating build\bdist.win32\egg\mapfish\controllers copying build\lib\mapfish\controllers\auth_proxy.py -> build\bdist.win32 \egg\mapfish\controllers copying build\lib\mapfish\controllers\printer.py -> build\bdist.win32 \egg\mapfish\controllers copying build\lib\mapfish\controllers\security.py -> build\bdist.win32 \egg\mapfish\controllers copying build\lib\mapfish\controllers\__init__.py -> build\bdist.win32 \egg\mapfish\controllers creating build\bdist.win32\egg\mapfish\lib creating build\bdist.win32\egg\mapfish\lib\filters copying build\lib\mapfish\lib\filters\comparison.py -> build\bdist.win32 \egg\mapfish\lib\filters copying build\lib\mapfish\lib\filters\featureid.py -> build\bdist.win32 \egg\mapfish\lib\filters copying build\lib\mapfish\lib\filters\logical.py -> build\bdist.win32 \egg\mapfish\lib\filters copying build\lib\mapfish\lib\filters\spatial.py -> build\bdist.win32 \egg\mapfish\lib\filters copying build\lib\mapfish\lib\filters\__init__.py -> build\bdist.win32 \egg\mapfish\lib\filters copying build\lib\mapfish\lib\protocol.py -> build\bdist.win32\egg \mapfish\lib copying build\lib\mapfish\lib\__init__.py -> build\bdist.win32\egg \mapfish\lib creating build\bdist.win32\egg\mapfish\plugins copying build\lib\mapfish\plugins\pgrouting.py -> build\bdist.win32\egg \mapfish\plugins copying build\lib\mapfish\plugins\__init__.py -> build\bdist.win32\egg \mapfish\plugins copying build\lib\mapfish\sqlalchemygeom.py -> build\bdist.win32\egg \mapfish creating build\bdist.win32\egg\mapfish\templates copying build\lib\mapfish\templates\controller.py_tmpl -> build \bdist.win32\egg\mapfish\templates copying build\lib\mapfish\templates\model.py_tmpl -> build\bdist.win32 \egg\mapfish\templates creating build\bdist.win32\egg\mapfish\templates\project creating build\bdist.win32\egg\mapfish\templates\project\+package+ creating build\bdist.win32\egg\mapfish\templates\project\+package+\model copying build\lib\mapfish\templates\project\+package+\model \__init__.py_tmpl -> build\bdist.win32\egg\mapfish\templates\ project\+package+\model copying build\lib\mapfish\templates\project\development.ini_tmpl -> build\bdist.win32\egg\mapfish\templates\project copying build\lib\mapfish\templates\project\layers.ini_tmpl -> build \bdist.win32\egg\mapfish\templates\project copying build\lib\mapfish\templates\test_controller.py_tmpl -> build \bdist.win32\egg\mapfish\templates copying build\lib\mapfish\util.py -> build\bdist.win32\egg\mapfish copying build\lib\mapfish\__init__.py -> build\bdist.win32\egg\mapfish byte-compiling build\bdist.win32\egg\mapfish\commands.py to commands.pyc byte-compiling build\bdist.win32\egg\mapfish\controllers\auth_proxy.py to auth_proxy.pyc byte-compiling build\bdist.win32\egg\mapfish\controllers\printer.py to printer.pyc byte-compiling build\bdist.win32\egg\mapfish\controllers\security.py to security.pyc byte-compiling build\bdist.win32\egg\mapfish\controllers\__init__.py to __init__.pyc byte-compiling build\bdist.win32\egg\mapfish\lib\filters\comparison.py to comparison.pyc byte-compiling build\bdist.win32\egg\mapfish\lib\filters\featureid.py to featureid.pyc byte-compiling build\bdist.win32\egg\mapfish\lib\filters\logical.py to logical.pyc byte-compiling build\bdist.win32\egg\mapfish\lib\filters\spatial.py to spatial.pyc byte-compiling build\bdist.win32\egg\mapfish\lib\filters\__init__.py to __init__.pyc byte-compiling build\bdist.win32\egg\mapfish\lib\protocol.py to protocol.pyc byte-compiling build\bdist.win32\egg\mapfish\lib\__init__.py to __init__.pyc byte-compiling build\bdist.win32\egg\mapfish\plugins\pgrouting.py to pgrouting.pyc byte-compiling build\bdist.win32\egg\mapfish\plugins\__init__.py to __init__.pyc byte-compiling build\bdist.win32\egg\mapfish\sqlalchemygeom.py to sqlalchemygeom.pyc byte-compiling build\bdist.win32\egg\mapfish\util.py to util.pyc byte-compiling build\bdist.win32\egg\mapfish\__init__.py to __init__.pyc creating build\bdist.win32\egg\EGG-INFO copying MapFish.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO copying MapFish.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO copying MapFish.egg-info\dependency_links.txt -> build\bdist.win32\egg \EGG-INFO copying MapFish.egg-info\entry_points.txt -> build\bdist.win32\egg \EGG-INFO copying MapFish.egg-info\not-zip-safe -> build\bdist.win32\egg\EGG-INFO copying MapFish.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO copying MapFish.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO creating 'dist\MapFish-0.3-py2.5.egg' and adding 'build\bdist.win32\egg' to it removing 'build\bdist.win32\egg' (and everything under it) Processing MapFish-0.3-py2.5.egg creating c:\vpython5\lib\site-packages\MapFish-0.3-py2.5.egg Extracting MapFish-0.3-py2.5.egg to c:\vpython5\lib\site-packages Adding MapFish 0.3 to easy-install.pth file Installed c:\vpython5\lib\site-packages\mapfish-0.3-py2.5.egg Processing dependencies for MapFish==0.3 Searching for GeoJSON>=1.0a3 Reading http://pypi.python.org/simple/GeoJSON/ Couldn't find index page for 'GeoJSON' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://pypi.python.org/simple/ Reading http://pypi.python.org/simple/geojson/ Reading http://trac.gispython.org/projects/PCL/wiki/GeoJSON Best match: geojson 1.0 Downloading http://pypi.python.org/packages/source/g/geojson/geojson-1.0.tar.gz#md5=2d36a78208ac6e85e3b6abace6fcceb0 Processing geojson-1.0.tar.gz Running geojson-1.0\setup.py -q bdist_egg --dist-dir c:\docume~1\geodev \locals~1\temp\easy_install-aid9pi\geojson-1.0\eg g-dist-tmp-nwcyyr zip_safe flag not set; analyzing archive contents... Adding geojson 1.0 to easy-install.pth file Installed c:\vpython5\lib\site-packages\geojson-1.0-py2.5.egg Searching for Shapely>=1.0a7 Reading http://pypi.python.org/simple/Shapely/ Reading http://trac.gispython.org/lab/wiki/Shapely Reading http://trac.gispython.org/projects/PCL/wiki/Shapely Reading http://trac.gispython.org/projects/PCL/wiki/ShapeLy Best match: Shapely 1.0.7 Downloading http://pypi.python.org/packages/any/S/Shapely/Shapely-1.0.7.win32.exe#md5=509d2d5700fc8ea46918d3c90bbaa571 Processing Shapely-1.0.7.win32.exe WARNING: can't process DATA/DLLs/geos.dll WARNING: can't process DATA/DLLs/libgeos-3-0-0.dll shapely.geos: module references __file__ creating 'c:\docume~1\geodev\locals~1\temp\easy_install-2bwvl1 \Shapely-1.0.7-py2.5-win32.egg' and adding 'c:\docume~1\ge odev\locals~1\temp\easy_install-2bwvl1 \Shapely-1.0.7-py2.5-win32.egg.tmp' to it creating c:\vpython5\lib\site-packages\Shapely-1.0.7-py2.5-win32.egg Extracting Shapely-1.0.7-py2.5-win32.egg to c:\vpython5\lib \site-packages Adding Shapely 1.0.7 to easy-install.pth file Installed c:\vpython5\lib\site-packages\shapely-1.0.7-py2.5-win32.egg Searching for Pylons==0.9.6.2 Reading http://pypi.python.org/simple/Pylons/ Reading http://www.pylonshq.com/ Reading http://pylons.groovie.org/ Best match: Pylons 0.9.6.2 Downloading http://pypi.python.org/packages/2.5/P/Pylons/Pylons-0.9.6.2-py2.5.egg#md5=d77d57de37d6ba1cb3bb743b22996e29 Processing Pylons-0.9.6.2-py2.5.egg creating c:\vpython5\lib\site-packages\Pylons-0.9.6.2-py2.5.egg Extracting Pylons-0.9.6.2-py2.5.egg to c:\vpython5\lib\site-packages Adding Pylons 0.9.6.2 to easy-install.pth file Installed c:\vpython5\lib\site-packages\pylons-0.9.6.2-py2.5.egg Reading http://www.pylonshq.com/download/ Searching for SQLAlchemy>=0.5.0beta2 Reading http://pypi.python.org/simple/SQLAlchemy/ Reading http://www.sqlalchemy.org Best match: SQLAlchemy 0.5.0beta3 Downloading http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.5.0beta3.tar.gz#md5=4141012a9c71207b82dcabb 7ea7a15cb Processing SQLAlchemy-0.5.0beta3.tar.gz Running SQLAlchemy-0.5.0beta3\setup.py -q bdist_egg --dist-dir c: \docume~1\geodev\locals~1\temp\easy_install-lb0_8d\SQLA lchemy-0.5.0beta3\egg-dist-tmp-xejdjf zip_safe flag not set; analyzing archive contents... sqlalchemy.databases.mysql: module MAY be using inspect.stack Adding sqlalchemy 0.5.0beta3 to easy-install.pth file Installed c:\vpython5\lib\site-packages\sqlalchemy-0.5.0beta3-py2.5.egg Searching for simplejson Best match: simplejson 1.7.1 Downloading http://pylons.cachefly.net/download/0.9.6.2/simplejson-1.7.1-py2.5.egg Processing simplejson-1.7.1-py2.5.egg Moving simplejson-1.7.1-py2.5.egg to c:\vpython5\lib\site-packages Adding simplejson 1.7.1 to easy-install.pth file Installed c:\vpython5\lib\site-packages\simplejson-1.7.1-py2.5.egg Searching for Mako>=0.1.8 Best match: Mako 0.1.8 Downloading http://pylons.cachefly.net/download/0.9.6.2/Mako-0.1.8.tar.gz Processing Mako-0.1.8.tar.gz Running Mako-0.1.8\setup.py -q bdist_egg --dist-dir c:\docume~1\geodev \locals~1\temp\easy_install-fbekko\Mako-0.1.8\egg- dist-tmp-smy5nr Adding mako 0.1.8 to easy-install.pth file Installed c:\vpython5\lib\site-packages\mako-0.1.8-py2.5.egg Searching for nose>=0.9.3 Reading http://pypi.python.org/simple/nose/ Reading http://somethingaboutorange.com/mrl/projects/nose/ Best match: nose 0.10.3 Downloading http://somethingaboutorange.com/mrl/projects/nose/nose-0.10.3.tar.gz Processing nose-0.10.3.tar.gz Running nose-0.10.3\setup.py -q bdist_egg --dist-dir c:\docume~1\geodev \locals~1\temp\easy_install-o4agln\nose-0.10.3\eg g-dist-tmp-vpj2la zip_safe flag not set; analyzing archive contents... nose.importer: module references __file__ nose.importer: module references __path__ nose.inspector: module MAY be using inspect.findsource nose.loader: module references __path__ nose.suite: module references __path__ nose.util: module references __file__ nose.ext.dtcompat: module references __file__ nose.ext.dtcompat: module MAY be using inspect.getsourcefile nose.plugins.cover: module references __file__ nose.plugins.doctests: module references __file__ Adding nose 0.10.3 to easy-install.pth file Installing nosetests-script.py script to c:\vpython5\Scripts Installing nosetests.exe script to c:\vpython5\Scripts Installed c:\vpython5\lib\site-packages\nose-0.10.3-py2.5.egg Searching for decorator>=2.1.0 Reading http://pypi.python.org/simple/decorator/ Reading http://www.phyast.pitt.edu/~micheles/python/documentation.html Best match: decorator 2.3.1 Downloading http://www.phyast.pitt.edu/~micheles/python/decorator-2.3.1.zip Processing decorator-2.3.1.zip Running setup.py -q bdist_egg --dist-dir c:\docume~1\geodev\locals~1 \temp\easy_install-esiasm\egg-dist-tmp-50u5nu Adding decorator 2.3.1 to easy-install.pth file Installed c:\vpython5\lib\site-packages\decorator-2.3.1-py2.5.egg Searching for FormEncode>=0.7 Best match: FormEncode 0.7.1 Downloading http://pylons.cachefly.net/download/0.9.6.2/FormEncode-0.7.1.tar.gz Processing FormEncode-0.7.1.tar.gz Running FormEncode-0.7.1\setup.py -q bdist_egg --dist-dir c:\docume~1 \geodev\locals~1\temp\easy_install-jjuwwn\FormEncod e-0.7.1\egg-dist-tmp-hi-rd6 warning: no files found matching '*.py' under directory '.' warning: no files found matching '*.html' under directory 'docs' no previously-included directories found matching '**\.svn' zip_safe flag not set; analyzing archive contents... formencode.fields: module references __file__ formencode.util.doctest24: module references __file__ formencode.util.doctest24: module MAY be using inspect.getsourcefile Adding formencode 0.7.1 to easy-install.pth file Installed c:\vpython5\lib\site-packages\formencode-0.7.1-py2.5.egg Searching for PasteScript>=1.3.6 Best match: PasteScript 1.3.6 Downloading http://pylons.cachefly.net/download/0.9.6.2/PasteScript-1.3.6.tar.gz Processing PasteScript-1.3.6.tar.gz Running PasteScript-1.3.6\setup.py -q bdist_egg --dist-dir c:\docume~1 \geodev\locals~1\temp\easy_install-xx9nat\PasteScr ipt-1.3.6\egg-dist-tmp-d6tqcv Adding pastescript 1.3.6 to easy-install.pth file Installing paster script to c:\vpython5\Scripts Installing paster-script.py script to c:\vpython5\Scripts Installing paster.exe script to c:\vpython5\Scripts Installed c:\vpython5\lib\site-packages\pastescript-1.3.6-py2.5.egg Searching for PasteDeploy>=1.3.1 Best match: PasteDeploy 1.3.1 Downloading http://pylons.cachefly.net/download/0.9.6.2/PasteDeploy-1.3.1.tar.gz Processing PasteDeploy-1.3.1.tar.gz Running PasteDeploy-1.3.1\setup.py -q bdist_egg --dist-dir c:\docume~1 \geodev\locals~1\temp\easy_install-qrgncy\PasteDep loy-1.3.1\egg-dist-tmp-yhe9re warning: no files found matching 'docs\*.html' warning: no previously-included files found matching 'docs\rebuild' Adding pastedeploy 1.3.1 to easy-install.pth file Installed c:\vpython5\lib\site-packages\pastedeploy-1.3.1-py2.5.egg Searching for Paste>=1.4 Best match: Paste 1.4.2 Downloading http://pylons.cachefly.net/download/0.9.6.2/Paste-1.4.2.tar.gz Processing Paste-1.4.2.tar.gz Running Paste-1.4.2\setup.py -q bdist_egg --dist-dir c:\docume~1\geodev \locals~1\temp\easy_install-nv76np\Paste-1.4.2\eg g-dist-tmp-v_kxi_ Adding paste 1.4.2 to easy-install.pth file Installed c:\vpython5\lib\site-packages\paste-1.4.2-py2.5.egg Searching for Beaker>=0.8.1 Reading http://pypi.python.org/simple/Beaker/ Reading http://beaker.groovie.org Best match: Beaker 1.0.1 Downloading http://pypi.python.org/packages/2.5/B/Beaker/Beaker-1.0.1-py2.5.egg#md5=ea4b413984e41218cc7b5bb000769e26 Processing Beaker-1.0.1-py2.5.egg creating c:\vpython5\lib\site-packages\Beaker-1.0.1-py2.5.egg Extracting Beaker-1.0.1-py2.5.egg to c:\vpython5\lib\site-packages Adding Beaker 1.0.1 to easy-install.pth file Installed c:\vpython5\lib\site-packages\beaker-1.0.1-py2.5.egg Searching for WebHelpers>=0.3.2 Best match: WebHelpers 0.3.2 Downloading http://pylons.cachefly.net/download/0.9.6.2/WebHelpers-0.3.2.tar.gz Processing WebHelpers-0.3.2.tar.gz Running WebHelpers-0.3.2\setup.py -q bdist_egg --dist-dir c:\docume~1 \geodev\locals~1\temp\easy_install-gpnh91\WebHelper s-0.3.2\egg-dist-tmp-r9eb8g Adding webhelpers 0.3.2 to easy-install.pth file Installed c:\vpython5\lib\site-packages\webhelpers-0.3.2-py2.5.egg Searching for Routes>=1.7.3 Best match: Routes 1.7.3 Downloading http://pylons.cachefly.net/download/0.9.6.2/Routes-1.7.3-py2.5.egg Processing Routes-1.7.3-py2.5.egg creating c:\vpython5\lib\site-packages\Routes-1.7.3-py2.5.egg Extracting Routes-1.7.3-py2.5.egg to c:\vpython5\lib\site-packages Adding Routes 1.7.3 to easy-install.pth file Installed c:\vpython5\lib\site-packages\routes-1.7.3-py2.5.egg Searching for setuptools==0.6c8 Best match: setuptools 0.6c8 Processing setuptools-0.6c8-py2.5.egg setuptools 0.6c8 is already the active version in easy-install.pth Installing easy_install-script.py script to c:\vpython5\Scripts Installing easy_install.exe script to c:\vpython5\Scripts Installing easy_install-2.5-script.py script to c:\vpython5\Scripts Installing easy_install-2.5.exe script to c:\vpython5\Scripts Using c:\vpython5\lib\site-packages\setuptools-0.6c8-py2.5.egg Finished processing dependencies for MapFish==0.3 (vpython5) C:\MapFish\server\python>cd \ (vpython5) C:\>c:\vpython5\Scripts\paster create --overwrite --no-interactive --template=mapfish MFYM5 mapfishclientmfba sepath=c:\MapFish\client\mfbase Selected and implied templates: pylons#pylons Pylons application template mapfish#mapfish Template for creating a basic MapFish project Variables: egg: MFYM5 mapfishclientmfbasepath: c:\MapFish\client\mfbase package: mfym5 project: MFYM5 Creating template pylons Creating directory .\MFYM5 Recursing into +egg+.egg-info Creating .\MFYM5\MFYM5.egg-info/ Copying paste_deploy_config.ini_tmpl_tmpl to .\MFYM5\MFYM5.egg-info \paste_deploy_config.ini_tmpl Recursing into +package+ Creating .\MFYM5\mfym5/ Copying __init__.py_tmpl to .\MFYM5\mfym5\__init__.py Recursing into config Creating .\MFYM5\mfym5\config/ Copying __init__.py_tmpl to .\MFYM5\mfym5\config\__init__.py Copying environment.py_tmpl to .\MFYM5\mfym5\config\environment.py Copying middleware.py_tmpl to .\MFYM5\mfym5\config\middleware.py Copying routing.py_tmpl to .\MFYM5\mfym5\config\routing.py Recursing into controllers Creating .\MFYM5\mfym5\controllers/ Copying __init__.py_tmpl to .\MFYM5\mfym5\controllers\__init__.py Copying error.py_tmpl to .\MFYM5\mfym5\controllers\error.py Copying template.py_tmpl to .\MFYM5\mfym5\controllers\template.py Recursing into lib Creating .\MFYM5\mfym5\lib/ Copying __init__.py_tmpl to .\MFYM5\mfym5\lib\__init__.py Copying app_globals.py_tmpl to .\MFYM5\mfym5\lib\app_globals.py Copying base.py_tmpl to .\MFYM5\mfym5\lib\base.py Copying helpers.py_tmpl to .\MFYM5\mfym5\lib\helpers.py Recursing into model Creating .\MFYM5\mfym5\model/ Copying __init__.py_tmpl to .\MFYM5\mfym5\model\__init__.py Recursing into public Creating .\MFYM5\mfym5\public/ Copying index.html_tmpl to .\MFYM5\mfym5\public\index.html Recursing into templates Creating .\MFYM5\mfym5\templates/ Recursing into tests Creating .\MFYM5\mfym5\tests/ Copying __init__.py_tmpl to .\MFYM5\mfym5\tests\__init__.py Recursing into functional Creating .\MFYM5\mfym5\tests\functional/ Copying __init__.py_tmpl to .\MFYM5\mfym5\tests\functional \__init__.py Copying test_models.py_tmpl to .\MFYM5\mfym5\tests\test_models.py Copying websetup.py_tmpl to .\MFYM5\mfym5\websetup.py Copying MANIFEST.in_tmpl to .\MFYM5\MANIFEST.in Copying README.txt_tmpl to .\MFYM5\README.txt Copying development.ini_tmpl to .\MFYM5\development.ini Recursing into docs Creating .\MFYM5\docs/ Copying index.txt_tmpl to .\MFYM5\docs\index.txt Copying setup.cfg_tmpl to .\MFYM5\setup.cfg Copying setup.py_tmpl to .\MFYM5\setup.py Copying test.ini_tmpl to .\MFYM5\test.ini Creating template mapfish Recursing into +package+ Recursing into model Copying __init__.py_tmpl to .\MFYM5\mfym5\model\__init__.py Copying development.ini_tmpl to .\MFYM5\development.ini Copying layers.ini_tmpl to .\MFYM5\layers.ini Running c:\vpython5\Scripts\python.exe setup.py egg_info Adding Pylons to paster_plugins.txt Adding WebHelpers to paster_plugins.txt Adding MapFish to paster_plugins.txt (vpython5) C:\>cd MFYM5 (vpython5) C:\MFYM5>c:\vpython5\Scripts\paster mf-layer gpco An error occurred. An unknown error occurred. No option 'plural' in section: 'gpco' (vpython5) C:\MFYM5> === New setup2 END === Another error ?? There are quite a few moving pieces here I'll try to set up MapFish server on my Ubuntu laptop to see if it's me or what. Thanx for your support, Yves _______________________________________________ Users mailing list Users@... http://www.mapfish.org/cgi-bin/mailman/listinfo/users |
|
|
Re: [Fwd: Re: mf-layer issue]> (vpython5) C:\MFYM5>c:\vpython5\Scripts\paster mf-layer gpco
> An error occurred. An unknown error occurred. No option 'plural' in > section: 'gpco' > > (vpython5) C:\MFYM5> > > === New setup2 END === > > Another error ?? There are quite a few moving pieces here With MapFish trunk you see a plural attribute in your layer config. See <http://trac.mapfish.org/trac/mapfish/wiki/Releases/0.3/HowToUseMapFishServer> which is the doc corresponding to what's in current trunk. -- Eric _______________________________________________ Users mailing list Users@... http://www.mapfish.org/cgi-bin/mailman/listinfo/users |
|
|
Re: [Fwd: Re: mf-layer issue]On Fri, Sep 12, 2008 at 9:08 AM, Eric Lemoine <eric.c2c@...> wrote:
>> (vpython5) C:\MFYM5>c:\vpython5\Scripts\paster mf-layer gpco >> An error occurred. An unknown error occurred. No option 'plural' in >> section: 'gpco' >> >> (vpython5) C:\MFYM5> >> >> === New setup2 END === >> >> Another error ?? There are quite a few moving pieces here > > With MapFish trunk you see a plural attribute in your layer config. > See <http://trac.mapfish.org/trac/mapfish/wiki/Releases/0.3/HowToUseMapFishServer> > which is the doc corresponding to what's in current trunk. Do not hesitate to send me your layers.ini file so I can check whether it works on my Linux installation. Thanks, -- Eric _______________________________________________ Users mailing list Users@... http://www.mapfish.org/cgi-bin/mailman/listinfo/users |
|
|
Re: [Fwd: Re: mf-layer issue]Hi All,
Please bear with me a bit more. I'm almost there. With this routes.py : # CUSTOM ROUTES HERE map.connect('gpco/', controller='gpco', action='get', conditions=dict(method=['GET'])) map.connect('gpco/:(id).:(format)', controller='gpco', action='get', conditions=dict(method=['GET'])) map.connect(':controller/:action/:id') map.connect('*url', controller='template', action='view') I get : http://localhost:5000/gpco?maxfeatures=10 _______________________________________________ Users mailing list Users@... http://www.mapfish.org/cgi-bin/mailman/listinfo/users |
|
|
Re: [Fwd: Re: mf-layer issue]Hi All,
please bear with me a bit more. I'm almost there. With routing.py : # CUSTOM ROUTES HERE map.connect('gpco/', controller='gpco', action='get', conditions=dict(method=['GET'])) map.connect('gpco/:(id).:(format)', controller='gpco', action='get', conditions=dict(method=['GET'])) map.connect(':controller/:action/:id') map.connect('*url', controller='template', action='view') I get http://localhost:5000/gpco?maxfeatures=10 Error Traceback clear this clear this URL: http://localhost:5000/gpco?maxfeatures=10 Module pylons.error:245 in respond << try: __traceback_supplement__ = Supplement, self, environ app_iter = self.application(environ, detect_start_response) try: return_iter = list(app_iter)>> app_iter = self.application(environ, detect_start_response) Module pylons.wsgiapp:314 in __call__ << def __call__(self, environ, start_response): environ['pylons.environ_config'] = self.econf return self.app(environ, start_response)>> return self.app(environ, start_response) Module beaker.middleware:74 in __call__ << environ['paste.registry'].register(self.cache, self.cache_manager) environ[self.environ_key] = self.cache_manager return self.app(environ, start_response) >> return self.app(environ, start_response) Module beaker.middleware:147 in __call__ << headers.append(('Set-cookie', cookie)) return start_response(status, headers, exc_info) return self.wrap_app(environ, session_start_response) def _get_session(self):>> return self.wrap_app(environ, session_start_response) Module routes.middleware:99 in __call__ << environ['SCRIPT_NAME'] = environ['SCRIPT_NAME'][:-1] response = self.app(environ, start_response) del config.environ del self.mapper.environ>> response = self.app(environ, start_response) Module pylons.wsgiapp:95 in __call__ << controller = self.resolve(environ, start_response) response = self.dispatch(controller, environ, start_response) if 'paste.testing_variables' in environ and hasattr(response,>> response = self.dispatch(controller, environ, start_response) Module pylons.wsgiapp:236 in dispatch << if log_debug: log.debug("Calling controller class with WSGI interface") return controller(environ, start_response) def load_test_env(self, environ):>> return controller(environ, start_response) Module mfym5.lib.base:24 in __call__ << # the request is routed to. This routing information is # available in environ['pylons.routes_dict'] return WSGIController.__call__(self, environ, start_response) finally: model.Session.remove()>> return WSGIController.__call__(self, environ, start_response) Module pylons.controllers.core:164 in __call__ << return response(environ, self.start_response) response = self._dispatch_call() if not start_response_called: # If its not a WSGI response, and we have content, it needs to>> response = self._dispatch_call() Module pylons.controllers.core:126 in _dispatch_call << if pylons.config['debug']: raise NotImplementedError('Action %r is not implemented' % action) else: response = WSGIResponse(code=404)>> action) <type 'exceptions.NotImplementedError'>: Action u'get' is not implemented So it's a matter of an action being not implemented. I think I followed the finish up instructions line for line. Any clue as to what goes wrong here ? Just to test, I removed my custom routes as in : # map.connect('gpco/', controller='gpco', action='get', conditions=dict(method=['GET'])) # map.connect('gpco/:(id).:(format)', controller='gpco', action='get', conditions=dict(method=['GET'])) map.connect(':controller/:action/:id') map.connect('*url', controller='template', action='view') I get : Error Traceback clear this clear this Module mfym5.controllers.gpco:58 in index << # return self.protocol.index(request, response, format=format, filter=filter) # return self.protocol.index(request, response, format=format) def show(self, id, format='json'):>> return self.protocol.index(request, response, format=format) Module mapfish.lib.protocol:132 in index << ) return self._encode(self._query(filter, limit)) def show(self, request, response, id, format='json'):>> return self._encode(self._query(filter, limit)) Module mapfish.lib.protocol:104 in _encode << return dumps( FeatureCollection( [o.toFeature() for o in objects if o.geometry] ) )>> [o.toFeature() for o in objects if o.geometry] Module mapfish.sqlalchemygeom:169 in toFeature << return Feature(id=self.fid, geometry=self.geometry, properties=attributes)>> properties=attributes) Module geojson.feature:24 in __init__ Module geojson.base:52 in to_instance Module geojson.base:52 in <genexpr> Module geojson.mapping:37 in __getitem__ <type 'exceptions.TypeError'>: string indices must be integers So it's some misconfig somewhere ... Thanx for pointers. When I see a geojson string, I'll write the sequence of steps. Yves _______________________________________________ Users mailing list Users@... http://www.mapfish.org/cgi-bin/mailman/listinfo/users |
|
|
Re: mf-layer issueHi Yves. If you use trunk you need to follow the 0.3 doc (I have you a
pointer to it in some previous email) and use map.resource as opposed to map.connect. You can also look at examples in MapFishSample. Eric 2008/9/12, Yves Moisan <yves.moisan@...>: > Hi All, > > please bear with me a bit more. I'm almost there. > > With routing.py : > > # CUSTOM ROUTES HERE > map.connect('gpco/', controller='gpco', action='get', > conditions=dict(method=['GET'])) > map.connect('gpco/:(id).:(format)', controller='gpco', action='get', > conditions=dict(method=['GET'])) > map.connect(':controller/:action/:id') > map.connect('*url', controller='template', action='view') > > I get http://localhost:5000/gpco?maxfeatures=10 > > Error Traceback > clear this > clear this > URL: http://localhost:5000/gpco?maxfeatures=10 > Module pylons.error:245 in respond > << try: > __traceback_supplement__ = Supplement, self, environ > app_iter = self.application(environ, detect_start_response) > try: > return_iter = list(app_iter)>> app_iter = > self.application(environ, detect_start_response) > Module pylons.wsgiapp:314 in __call__ > << def __call__(self, environ, start_response): > environ['pylons.environ_config'] = self.econf > return self.app(environ, start_response)>> return > self.app(environ, start_response) > Module beaker.middleware:74 in __call__ > << environ['paste.registry'].register(self.cache, > self.cache_manager) > environ[self.environ_key] = self.cache_manager > return self.app(environ, start_response) > > >> return self.app(environ, start_response) > Module beaker.middleware:147 in __call__ > << headers.append(('Set-cookie', cookie)) > return start_response(status, headers, exc_info) > return self.wrap_app(environ, session_start_response) > > def _get_session(self):>> return self.wrap_app(environ, > session_start_response) > Module routes.middleware:99 in __call__ > << environ['SCRIPT_NAME'] = environ['SCRIPT_NAME'][:-1] > > response = self.app(environ, start_response) > del config.environ > del self.mapper.environ>> response = self.app(environ, > start_response) > Module pylons.wsgiapp:95 in __call__ > << > controller = self.resolve(environ, start_response) > response = self.dispatch(controller, environ, start_response) > > if 'paste.testing_variables' in environ and hasattr(response,>> > response = self.dispatch(controller, environ, start_response) > Module pylons.wsgiapp:236 in dispatch > << if log_debug: > log.debug("Calling controller class with WSGI interface") > return controller(environ, start_response) > > def load_test_env(self, environ):>> return controller(environ, > start_response) > Module mfym5.lib.base:24 in __call__ > << # the request is routed to. This routing information is > # available in environ['pylons.routes_dict'] > return WSGIController.__call__(self, environ, > start_response) > finally: > model.Session.remove()>> return > WSGIController.__call__(self, environ, start_response) > Module pylons.controllers.core:164 in __call__ > << return response(environ, self.start_response) > > response = self._dispatch_call() > if not start_response_called: > # If its not a WSGI response, and we have content, it needs > to>> response = self._dispatch_call() > Module pylons.controllers.core:126 in _dispatch_call > << if pylons.config['debug']: > raise NotImplementedError('Action %r is not implemented' > % > action) > else: > response = WSGIResponse(code=404)>> action) > <type 'exceptions.NotImplementedError'>: Action u'get' is not implemented > > So it's a matter of an action being not implemented. I think I followed > the finish up instructions line for line. Any clue as to what goes > wrong here ? > > Just to test, I removed my custom routes as in : > > # map.connect('gpco/', controller='gpco', action='get', > conditions=dict(method=['GET'])) > # map.connect('gpco/:(id).:(format)', controller='gpco', > action='get', conditions=dict(method=['GET'])) > map.connect(':controller/:action/:id') > map.connect('*url', controller='template', action='view') > > I get : > > Error Traceback > clear this > clear this > Module mfym5.controllers.gpco:58 in index > << # return self.protocol.index(request, response, > format=format, filter=filter) > # > return self.protocol.index(request, response, format=format) > > def show(self, id, format='json'):>> return > self.protocol.index(request, response, format=format) > Module mapfish.lib.protocol:132 in index > << ) > > return self._encode(self._query(filter, limit)) > > def show(self, request, response, id, format='json'):>> return > self._encode(self._query(filter, limit)) > Module mapfish.lib.protocol:104 in _encode > << return dumps( > FeatureCollection( > [o.toFeature() for o in objects if > o.geometry] > ) > )>> [o.toFeature() for o in objects if o.geometry] > Module mapfish.sqlalchemygeom:169 in toFeature > << return Feature(id=self.fid, > geometry=self.geometry, > properties=attributes)>> > properties=attributes) > Module geojson.feature:24 in __init__ > Module geojson.base:52 in to_instance > Module geojson.base:52 in <genexpr> > Module geojson.mapping:37 in __getitem__ > <type 'exceptions.TypeError'>: string indices must be integers > > So it's some misconfig somewhere ... > > Thanx for pointers. When I see a geojson string, I'll write the > sequence of steps. > > Yves > > _______________________________________________ > Users mailing list > Users@... > http://www.mapfish.org/cgi-bin/mailman/listinfo/users > Users mailing list Users@... http://www.mapfish.org/cgi-bin/mailman/listinfo/users |
|
|
Re: mf-layer issue> Hi Yves. If you use trunk you need to follow the 0.3 doc (I have you a
> pointer to it in some previous email) and use map.resource as opposed > to map.connect. You can also look at examples in MapFishSample. Eric Thanx Eric. I hadn't noticed the change in docs. I found out and now I can see my data, save for encoding (I believe). Here's the Traceback : Error Traceback Module mfym5.controllers.gpco:58 in index format 'json' self <mfym5.controllers.gpco.GpcoController object at 0x01966B90> << # return self.protocol.index(request, response, format=format, filter=filter) # return self.protocol.index(request, response, format=format) def show(self, id, format='json'):>> return self.protocol.index(request, response, format=format) Module mapfish.lib.protocol:132 in index filter None format 'json' limit 10 request <paste.wsgiwrappers.WSGIRequest object at 0x1966890 method='GET', scheme='http', host='localhost:...5000', script_name='', path_info='/gpco', languges=['en', 'fr', 'fr-fr', 'en-us'], charset='utf-8', errors='replace', GET=UnicodeMultiDict([('maxfeatures', u'10')]), POST=UnicodeMultiDict([]), cookies={}> response <paste.wsgiwrappers.WSGIResponse object at 0x019668B0> self <mapfish.lib.protocol.Protocol object at 0x01966C90> << ) return self._encode(self._query(filter, limit)) def show(self, request, response, id, format='json'):>> return self._encode(self._query(filter, limit)) Module mapfish.lib.protocol:104 in _encode _[1] [] o <mfym5.model.gpco.Gpco object at 0x019783D0> objects [<mfym5.model.gpco.Gpco object at 0x019783D0>, <mfym5.model.gpco.Gpco object at 0x01978410...>, <mfym5.model.gpco.Gpco object at 0x01978450>, <mfym5.model.gpco.Gpco object at 0x01978A70>, <mfym5.model.gpco.Gpco object at 0x01978AD0>, <mfym5.model.gpco.Gpco object at 0x01978B30>, <mfym5.model.gpco.Gpco object at 0x01978B90>, <mfym5.model.gpco.Gpco object at 0x01978BF0>, <mfym5.model.gpco.Gpco object at 0x01978C50>, <mfym5.model.gpco.Gpco object at 0x01978CB0>] self <mapfish.lib.protocol.Protocol object at 0x01966C90> << return dumps( FeatureCollection( [o.toFeature() for o in objects if o.geometry] ) )>> [o.toFeature() for o in objects if o.geometry] Module mapfish.sqlalchemygeom:169 in toFeature << return Feature(id=self.fid, geometry=self.geometry, properties=attributes)>> properties=attributes) Module geojson.feature:24 in __init__ Module geojson.base:52 in to_instance Module geojson.base:52 in <genexpr> Module geojson.mapping:37 in __getitem__ key '0' self <geojson.mapping.Mapping object at 0x019666D0> <type 'exceptions.TypeError'>: string indices must be integers My database is latin1. I need to find out where to change encoding in Pylons (Mako). Once I have that, I believe things will work out. Yves _______________________________________________ Users mailing list Users@... http://www.mapfish.org/cgi-bin/mailman/listinfo/users |
|
|
Re: mf-layer issue>
> Module geojson.mapping:37 in __getitem__ > > key '0' > > self <geojson.mapping.Mapping object at 0x019666D0> > > > <type 'exceptions.TypeError'>: string indices must be integers > > My database is latin1. I need to find out where to change encoding in > Pylons (Mako). Once I have that, I believe things will work out. Has nothing to do with charset. Has to do with geojson encoding. For some reason the key returned is a string instead of an int. geojson installed an egg file rather than an *egg directory with /EGG-INFO etc. I unzipped the egg file and found the geojson Python files, but I'm not sure what to do at this stage. Yves _______________________________________________ Users mailing list Users@... http://www.mapfish.org/cgi-bin/mailman/listinfo/users |