hotosm / osm-tasking-manager2

Designed and built for Humanitarian OpenStreetMap Team collaborative emergency/disaster mapping, the OSM Tasking Manager 2.0 divides an area into individual squares that can be rapidly mapped by thousands of volunteers.
http://tasks.hotosm.org
Other
425 stars 156 forks source link

Database import failed due to issues with HTML sanitizer #850

Closed derickr closed 8 years ago

derickr commented 8 years ago

Upon running:

derick@gargleblaster:~/dev/hotosm-osm-tasking-manager2 $ ./env/bin/initialize_osmtm_db

I received:

Traceback (most recent call last):
  File "./env/bin/initialize_osmtm_db", line 11, in <module>
    load_entry_point('osmtm', 'console_scripts', 'initialize_osmtm_db')()
  File "/home/derick/dev/hotosm-osm-tasking-manager2/env/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/derick/dev/hotosm-osm-tasking-manager2/env/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "/home/derick/dev/hotosm-osm-tasking-manager2/env/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/home/derick/dev/hotosm-osm-tasking-manager2/env/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/derick/dev/hotosm-osm-tasking-manager2/osmtm/__init__.py", line 1, in <module>
    import bleach
  File "/home/derick/dev/hotosm-osm-tasking-manager2/env/local/lib/python2.7/site-packages/bleach/__init__.py", line 8, in <module>
    from html5lib.sanitizer import HTMLSanitizer
ImportError: No module named sanitizer
[GIT: master]

I traced this to https://github.com/indico/indico/issues/2564 and the fix mentioned there works. After changing bleach=1.4 to bleach-1.4.3 in setup.py, I could successfully initialise the database.

pgiraud commented 8 years ago

Can you please turn your changes into a pull request?

derickr commented 8 years ago

Sure: https://github.com/hotosm/osm-tasking-manager2/pull/851