bugMapOSMatic - Bugs: bug #36251, Empty stylesheet on some rendering...

 
 

bug #36251: Empty stylesheet on some rendering requests

Submitted by:  David Mentré <dmentre>
Submitted on:  Thu 19 Apr 2012 01:33:00 PM UTC  
 
Category: webSeverity: 4 - Important
Priority: 7 - HighStatus: Confirmed
Privacy: PublicAssigned to: None
Open/Closed: OpenRelease: 2012.04

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 19 May 2012 03:51:43 PM UTC, comment #5:

Follow-up after a recent comment on contact@: this case appears on some old maps where the button 'Regenerate map' is available.

The button should not be available on such old maps.

David Mentré <dmentre>
Project Administrator
Mon 30 Apr 2012 04:07:51 PM UTC, comment #4:

I am wondering if following error has not the same origin: invalid parameters of the submitted job:

"""
An error occured while rendering job #46505!

Traceback (most recent call last):
File "/home/maposmatic/maposmatic-prod/maposmatic/scripts/render.py", line 307, in run
self.job.lon_bottom_right)
File "/home/maposmatic/maposmatic-prod/ocitysmap/ocitysmap2/coords.py", line 86, in _init_
(self._lat1, self._long1) = float(lat1), float(long1)
TypeError: float() argument must be a string or a number

Job information:

administrative_city: Meudon
administrative_osmid: None
endofrendering_time: None
id: 46505
index_queue_at_submission: 0
lat_bottom_right: None
lat_upper_left: None
layout:
lon_bottom_right: None
lon_upper_left: None
map_language: fr_FR.UTF-8
maptitle: Meudon
nonce: XXXXXXXXXXXX
paper_height_mm: -1
paper_width_mm: -1
resultmsg: None
startofrendering_time: 2012-04-30 17:56:56.995923
status: 1
stylesheet:
submission_time: 2012-04-30 17:56:55.264178
submitterip: XXXXXXXXXXXX

You can view the job page at <http://www.maposmatic.org/jobs/46505>.
"""

David Mentré <dmentre>
Project Administrator
Mon 30 Apr 2012 10:47:52 AM UTC, comment #3:

Regarding this bug, would it be possible that we don't validate form parameters against None?

For example, in following code:
http://git.savannah.gnu.org/cgit/maposmatic.git/tree/www/maposmatic/forms.py#n166
if stylesheet == '':
msg = _(u"Stylesheet required")
self._errors["stylesheet"] = forms.util.ErrorList([msg])
del cleaned_data["stylesheet"]

If stylesheet==None (e.g. after the call to cleaned_data.get("stylesheet")) then we don't go inside this test.

I cannot tell if this is indeed the bug as I cannot reproduce the issue.

David Mentré <dmentre>
Project Administrator
Mon 30 Apr 2012 08:42:24 AM UTC, comment #2:

I cannot reproduce it. I tried with following command line but if a parameter like stylesheet is invalid, then no job is created.

"""
curl --data "administrative_city=&administrative_osmid=&area_lat_bottom_right=48.1090&area_lat_upper_left=48.1140&area_lon_bottom_right=-1.6549&area_lon_upper_left=-1.6678&lat_bottom_right=48.1103&lat_upper_left=48.1126&layout=single_page_index_bottom&lon_bottom_right=-1.6593&lon_upper_left=-1.6629&map_language=fr_FR.UTF-8&maptitle=toto&mode=bbox&paper_height_mm=210&paper_width_mm=148&paperorientation=portrait&papersize=A5&stylesheet=" http://localhost:8000/new/
"""

Are there any other way to submit a new job?

David Mentré <dmentre>
Project Administrator
Tue 24 Apr 2012 06:44:19 PM UTC, comment #1:

We're still not sure how this happens; we need to track this down.

Maxime Petazzoni <mpetazzoni>
Project Administrator
Thu 19 Apr 2012 01:33:00 PM UTC, original submission:

It appears that for some rendering request an empty style sheet is chosen.

Here is an example of erroneous request:
"""
An error occured while rendering job #43688!

Traceback (most recent call last):
File "/home/maposmatic/maposmatic-prod/maposmatic/scripts/render.py", line 306, in run
self.job.stylesheet)
File "/home/maposmatic/maposmatic-prod/ocitysmap/ocitysmap2/__init__.py", line 391, in get_stylesheet_by_name
raise LookupError, 'The requested stylesheet %s was not found!' % name
LookupError: The requested stylesheet was not found!

Job information:

administrative_city: Arras, Pas-de-Calais, Nord-Pas-de-Calais, 62000, France
administrative_osmid: -1121015
endofrendering_time: None
id: 43688
index_queue_at_submission: 16
lat_bottom_right: None
lat_upper_left: None
layout:
lon_bottom_right: None
lon_upper_left: None
map_language: fr_FR.UTF-8
maptitle: Arras, Pas-de-Calais, Nord-Pas-de-Calais, 62000, France
nonce: XXXXXXXXXXXXXX
paper_height_mm: -1
paper_width_mm: -1
resultmsg: None
startofrendering_time: 2012-04-19 15:21:24.446964
status: 1
stylesheet:
submission_time: 2012-04-19 15:01:13.697561
submitterip: XXXXXXXXXXXXXX

You can view the job page at <http://www.maposmatic.org/jobs/43688>.

David Mentré <dmentre>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mpetazzoni (Posted a comment)
  • -unavailable- added by dmentre (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 24 Apr 2012 06:44:44 PM UTCmpetazzoniReleaseNone=>2012.04
    Tue 24 Apr 2012 06:44:19 PM UTCmpetazzoniCategorydaemon=>web
      Priority5 - Normal=>7 - High
      SummaryEmpty stylesheet for some rendering request=>Empty stylesheet on some rendering requests

    Back to the top


    Powered by Savane 3.1-cleanup