{"action":"closed","issue":{"url":"https://api.github.com/repos/GeoNode/geonode/issues/2469","repository_url":"https://api.github.com/repos/GeoNode/geonode","labels_url":"https://api.github.com/repos/GeoNode/geonode/issues/2469/labels{/name}","comments_url":"https://api.github.com/repos/GeoNode/geonode/issues/2469/comments","events_url":"https://api.github.com/repos/GeoNode/geonode/issues/2469/events","html_url":"https://github.com/GeoNode/geonode/issues/2469","id":147920624,"number":2469,"title":"Geonode importlayers error when metadata XML is present","user":{"login":"dvictori","id":5786553,"avatar_url":"https://avatars.githubusercontent.com/u/5786553?v=3","gravatar_id":"","url":"https://api.github.com/users/dvictori","html_url":"https://github.com/dvictori","followers_url":"https://api.github.com/users/dvictori/followers","following_url":"https://api.github.com/users/dvictori/following{/other_user}","gists_url":"https://api.github.com/users/dvictori/gists{/gist_id}","starred_url":"https://api.github.com/users/dvictori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvictori/subscriptions","organizations_url":"https://api.github.com/users/dvictori/orgs","repos_url":"https://api.github.com/users/dvictori/repos","events_url":"https://api.github.com/users/dvictori/events{/privacy}","received_events_url":"https://api.github.com/users/dvictori/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GeoNode/geonode/labels/bug","name":"bug","color":"ec6427"},{"url":"https://api.github.com/repos/GeoNode/geonode/labels/metadata","name":"metadata","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"tomkralidis","id":910430,"avatar_url":"https://avatars.githubusercontent.com/u/910430?v=3","gravatar_id":"","url":"https://api.github.com/users/tomkralidis","html_url":"https://github.com/tomkralidis","followers_url":"https://api.github.com/users/tomkralidis/followers","following_url":"https://api.github.com/users/tomkralidis/following{/other_user}","gists_url":"https://api.github.com/users/tomkralidis/gists{/gist_id}","starred_url":"https://api.github.com/users/tomkralidis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomkralidis/subscriptions","organizations_url":"https://api.github.com/users/tomkralidis/orgs","repos_url":"https://api.github.com/users/tomkralidis/repos","events_url":"https://api.github.com/users/tomkralidis/events{/privacy}","received_events_url":"https://api.github.com/users/tomkralidis/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/GeoNode/geonode/milestones/8","html_url":"https://github.com/GeoNode/geonode/milestones/2.4.1","labels_url":"https://api.github.com/repos/GeoNode/geonode/milestones/8/labels","id":1657947,"number":8,"title":"2.4.1","description":"","creator":{"login":"simod","id":779380,"avatar_url":"https://avatars.githubusercontent.com/u/779380?v=3","gravatar_id":"","url":"https://api.github.com/users/simod","html_url":"https://github.com/simod","followers_url":"https://api.github.com/users/simod/followers","following_url":"https://api.github.com/users/simod/following{/other_user}","gists_url":"https://api.github.com/users/simod/gists{/gist_id}","starred_url":"https://api.github.com/users/simod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simod/subscriptions","organizations_url":"https://api.github.com/users/simod/orgs","repos_url":"https://api.github.com/users/simod/repos","events_url":"https://api.github.com/users/simod/events{/privacy}","received_events_url":"https://api.github.com/users/simod/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":1,"state":"open","created_at":"2016-03-21T17:21:30Z","updated_at":"2016-04-13T11:53:30Z","due_on":"2016-04-14T22:00:00Z","closed_at":null},"comments":1,"created_at":"2016-04-13T01:35:06Z","updated_at":"2016-04-13T11:53:30Z","closed_at":"2016-04-13T11:53:30Z","body":"Trying to populate a new geonode instance (v2.4) with some shapefiles from another geonode (v2.4).\r\n\r\nI've placed all the shapefiles in a directory along with the metadata downloaded from the former geonode instance (ISO format, XML file, renamed to match the shapefile).\r\nThe importlayers command fails with the following message\r\n```python\r\n./par_a01_2013_inventoryplotsubplot.shp\r\n  ================\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/dist-packages/geonode/layers/utils.py\", line 588, in upload\r\n    title=title\r\n  File \"/usr/local/lib/python2.7/dist-packages/geonode/layers/utils.py\", line 429, in file_upload\r\n    vals, regions, keywords = set_metadata(xml_file.read())\r\n  File \"/usr/local/lib/python2.7/dist-packages/geonode/layers/metadata.py\", line 62, in set_metadata\r\n    vals, regions, keywords = dc2dict(exml)\r\n  File \"/usr/local/lib/python2.7/dist-packages/geonode/layers/metadata.py\", line 198, in dc2dict\r\n    vals['date'] = sniff_date(mdata.modified)\r\n  File \"/usr/local/lib/python2.7/dist-packages/geonode/layers/metadata.py\", line 222, in sniff_date\r\n    return datetime.datetime.strptime(datestr.strip(), dfmt)\r\nAttributeError: 'NoneType' object has no attribute 'strip'\r\n```\r\n-------------\r\nI attached the offending metadata XML file (renamed to txt sisnce GitHub did not like xml extension), just in case\r\n[par_a01_2013_las_boundary.txt](https://github.com/GeoNode/geonode/files/216257/par_a01_2013_las_boundary.txt)\r\n\r\n"}}