bugMapOSMatic - Bugs: bug #36270, Error in /apis/papersize/:...


bug #36270: Error in /apis/papersize/: "ReadingError: Could not create geometry because of errors while reading input"

Submitter:  David Mentré <dmentre>
Submitted:  Sun 22 Apr 2012 09:33:27 AM UTC
Category:  ocitysmap Severity:  3 - Normal
Priority:  * 7 - High Status:  Ready For Test
Privacy:  Public Assigned to:  dmentre
Open/Closed:  Open Release:  2012.04
* Mandatory Fields

Add a New Comment Rich Markup

Sun 06 May 2012 02:19:08 PM UTC, comment #3: 

I think I found it: in some cases a relation exists in OSM, so it is found by Nominatim, but it has a strange or invalid shape so it is not converted by osm2pgsql and it does not exist in the database.

Patch set on dev@ on 2012-05-06.

David Mentré <dmentre>
Group administrator
Sun 06 May 2012 01:48:47 PM UTC, comment #2: 

Could Maxime or Thomas, as you have access to the main machine, look for the following error in the logs:
ERROR:shapely.geos:basic_string::_S_construct null not valid

Is it close to a /apis/papersize/ error?


David Mentré <dmentre>
Group administrator
Sat 05 May 2012 04:24:14 PM UTC, comment #1: 

Can be reproduced on production database with:
  ocitysmap2-render --osmid=-1330715

Here is the faulting relation:

David Mentré <dmentre>
Group administrator
Sun 22 Apr 2012 09:33:27 AM UTC, original submission:  

Error while querying /apis/papersize/:

Traceback (most recent call last):

 File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py", line 100, in get_response
   response = callback(request, callback_args, *callback_kwargs)

 File "/home/maposmatic/maposmatic-prod/maposmatic/www/maposmatic/views.py", line 236, in query_papersize
   bbox_wkt, area_wkt = ocitysmap.get_geographic_info(osmid)

 File "/home/maposmatic/maposmatic-prod/ocitysmap/ocitysmap2/__init__.py", line 357, in get_geographic_info
   line_geom = self._get_geographic_info(osmid, 'line')

 File "/home/maposmatic/maposmatic-prod/ocitysmap/ocitysmap2/__init__.py", line 334, in _get_geographic_info
   return shapely.wkt.loads(wkt)

 File "/usr/lib/pymodules/python2.6/shapely/wkt.py", line 17, in loads
   "Could not create geometry because of errors while reading input."

ReadingError: Could not create geometry because of errors while reading input.

GET:<QueryDict: {}>,
POST:<QueryDict: {u'stylesheet': [u'Default'], u'layout': [u'single_page_index_bottom'], u'osmid': [u'-1330715']}>,
 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
 'DOCUMENT_ROOT': '/home/maposmatic/public_html/www.maposmatic.org',
 'HTTP_ACCEPT': '*/*',
 'HTTP_ACCEPT_CHARSET': 'windows-1251,utf-8;q=0.7,*;q=0.3',
 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_HOST': 'maposmatic.org',
 'HTTP_ORIGIN': 'http://maposmatic.org',
 'HTTP_REFERER': 'http://maposmatic.org/new/',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19',
 'PATH_INFO': u'/apis/papersize/',
 'PATH_TRANSLATED': '/home/maposmatic/public_html/www.maposmatic.org/maposmatic.wsgi/apis/papersize/',
 'REQUEST_URI': '/apis/papersize/',
 'SCRIPT_FILENAME': '/home/maposmatic/public_html/www.maposmatic.org/maposmatic.wsgi',
 'SCRIPT_NAME': u'',
 'SERVER_ADMIN': 'webmaster@maposmatic.org',
 'SERVER_NAME': 'maposmatic.org',
 'SERVER_PORT': '80',
 'SERVER_SIGNATURE': '<address>Apache/2.2.16 (Debian) Server at maposmatic.org Port 80</address>\n',
 'SERVER_SOFTWARE': 'Apache/2.2.16 (Debian)',
 'mod_wsgi.application_group': 'maposmatic.org|',
 'mod_wsgi.callable_object': 'application',
 'mod_wsgi.handler_script': '',
 'mod_wsgi.input_chunked': '0',
 'mod_wsgi.listener_host': '',
 'mod_wsgi.listener_port': '80',
 'mod_wsgi.process_group': '',
 'mod_wsgi.request_handler': 'wsgi-script',
 'mod_wsgi.script_reloading': '1',
 'mod_wsgi.version': (3, 2),
 'wsgi.errors': <mod_wsgi.Log object at 0x7f0449317070>,
 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f044956a990>,
 'wsgi.input': <mod_wsgi.Input object at 0x7f044910deb0>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 1)}>

David Mentré <dmentre>
Group administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mpetazzoni (Updated the item)
  • -email is unavailable- added by dmentre (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-05-06 dmentre StatusConfirmed Ready For Test
        Assigned toNone dmentre
    2012-04-24 mpetazzoni Summaryshapely error in /apis/papersize/: &quot;ReadingError: Could not create geometry because of errors while reading input&quot; Error in /apis/papersize/: "ReadingError: Could not create geometry because of errors while reading input"
    2012-04-24 mpetazzoni Priority5 - Normal 7 - High
        ReleaseNone 2012.04

    Back to the top

    Powered by Savane 3.12