Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zipped file upload does not work #1319

Closed
mbertrand opened this issue Dec 23, 2013 · 8 comments · Fixed by #2087
Closed

Zipped file upload does not work #1319

mbertrand opened this issue Dec 23, 2013 · 8 comments · Fixed by #2087
Assignees
Milestone

Comments

@mbertrand
Copy link
Member

This is with the GeoServer REST upload:

  1. Upload a zip file containing a shapefile (demolayer.shp, demolayer.dbf, etc)
  2. After completion, try uploading the same zipfile again, or a renamed zipfile with the same contents:

GeoNode encountered problems when creating layer demolayer_1.It cannot find the Layer that matches this Workspace.try renaming your files.

Possible solution: create a new zipfile, rename and copy over the contents of the old zipfile (demolayer.shp -> demolayer_1.shp, etc), and send the new zipfile to Geoserver for importing. I can create a PR for this quickly if it's an acceptable fix.

@ingenieroariel
Copy link
Member

Hey Matt,

Your solution makes sense. Thanks for diagnosing.

-a

On Mon, Dec 23, 2013 at 11:54 AM, Matt Bertrand [email protected]:

This is with the GeoServer REST upload:

  1. Upload a zip file containing a shapefile (demolayer.shp,
    demolayer.dbf, etc)
  2. After completion, try uploading the same zipfile again, or a
    renamed zipfile with the same contents:

GeoNode encountered problems when creating layer demolayer_1.It cannot
find the Layer that matches this Workspace.try renaming your files.

Possible solution: create a new zipfile, rename and copy over the contents
of the old zipfile (demolayer.shp -> demolayer_1.shp, etc), and send the
new zipfile to Geoserver for importing. I can create a PR for this quickly
if it's an acceptable fix.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1319
.

@javedyousafzai
Copy link

I am facing the same issue today. Geonode is asking me to rename my file when I try to upload my SHP file (zipped) which I did several time. I hope some one can fix this issue.

@capooti
Copy link
Member

capooti commented Feb 14, 2014

@javedyousafzai which version are you using? For me current version is working perfectly on my local box.

@javedyousafzai
Copy link

Thanks Paolo, I found the solution from a colleague. Instead of selecting the SHP in zip, I select all the files and upload and then it works.

@ingenieroariel ingenieroariel modified the milestone: 2.1 Apr 16, 2014
@mbertrand
Copy link
Member Author

Zipfile upload seems broken again.

Error message returned is 'NoneType' object has no attribute 'latlon_bbox'

'NoneType' object has no attribute 'latlon_bbox'
Traceback (most recent call last):
File "/home/mbertrand/Development/github/opengeo/geonode/geonode/layers/views.py", line 123, in layer_upload
title = form.cleaned_data["layer_title"],
File "/home/mbertrand/Development/github/opengeo/geonode/geonode/layers/utils.py", line 365, in file_upload
defaults=defaults
File "/home/mbertrand/.venvs/geonode/local/lib/python2.7/site-packages/django/db/models/manager.py", line 154, in get_or_create
return self.get_queryset().get_or_create(*_kwargs)
File "/home/mbertrand/.venvs/geonode/local/lib/python2.7/site-packages/django/db/models/query.py", line 383, in get_or_create
obj.save(force_insert=True, using=self.db)
File "/home/mbertrand/.venvs/geonode/local/lib/python2.7/site-packages/polymorphic/polymorphic_model.py", line 89, in save
return super(PolymorphicModel, self).save(_args, *_kwargs)
File "/home/mbertrand/.venvs/geonode/local/lib/python2.7/site-packages/django/db/models/base.py", line 545, in save
force_update=force_update, update_fields=update_fields)
File "/home/mbertrand/.venvs/geonode/local/lib/python2.7/site-packages/django/db/models/base.py", line 582, in save_base
update_fields=update_fields, raw=raw, using=using)
File "/home/mbertrand/.venvs/geonode/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 185, in send
response = receiver(signal=self, sender=sender, *_named)
File "/home/mbertrand/Development/github/opengeo/geonode/geonode/geoserver/signals.py", line 157, in geoserver_post_save
bbox = gs_resource.latlon_bbox
AttributeError: 'NoneType' object has no attribute 'latlon_bbox'

@jj0hns0n
Copy link
Contributor

jj0hns0n commented Feb 3, 2015

Im not sure we even support zip file uploads anymore?

@jj0hns0n jj0hns0n self-assigned this Feb 3, 2015
@ingenieroariel
Copy link
Member

We should support zip files. This would be a blocker.

@ingenieroariel ingenieroariel changed the title Can't upload zipfiles containing base filename that already exists in system Zipped file upload does not work Feb 4, 2015
@capooti
Copy link
Member

capooti commented Mar 12, 2015

This is working for me, I have just tested it with standard settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants