osm-fr / osmose-frontend

Part of osmose that shows results on the website http://osmose.openstreetmap.fr
GNU General Public License v3.0
41 stars 38 forks source link

TypeError: object of type 'NoneType' has no len() #360

Closed Famlam closed 1 year ago

Famlam commented 2 years ago

On http://osmose.openstreetmap.fr/nl/issues/graph.png?country=iraq (or any random country)

Traceback (most recent call last):
  File "/data/project/osmose/frontend/web_api/issues.py", line 44, in graph
    data = errors_graph.make_plt(db, Params(), format)
  File "/data/project/osmose/frontend/web_api/errors_graph.py", line 150, in make_plt
    text = get_text(db, params)
  File "/data/project/osmose/frontend/web_api/errors_graph.py", line 94, in get_text
    elif len(params.item)==1 and len(params.classs)==1:
TypeError: object of type 'NoneType' has no len()

How to reach?

  1. From the issues list (e.g. http://osmose.openstreetmap.fr/nl/issues/open?item=1040 if you clicked on item 1040 in the front page)
  2. Click on one of the country names (I randomly chose Iraq in this example, bringing me to http://osmose.openstreetmap.fr/nl/issues/open?country=iraq )
  3. Click graph on top
frodrigo commented 1 year ago

Fixed on last version.