-
Notifications
You must be signed in to change notification settings - Fork 1
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
Issue install django-warp via pip #7
Comments
Your problem is GDAL: https://stackoverflow.com/questions/37294127/python-gdal-2-1-installation-on-ubuntu-16-04 |
Hello Enricofer, Thanks for your help. I succesfully installed GDAL, then installed Django-warp via pip with no errors.
(Where is INSTALLED_APPS?)
(Where is urls.py?)
(where is ./ ?)
(What command to run server). |
I suggest you the awesome tutorial from djangogirls: https://tutorial.djangogirls.org/en/django_installation/index.html (in many other languages too) |
Thanks for the suggestion, I've just read it. I understand now your directions and I executed them with no errors. But there is an error when accessing 127.0.0.1:8000/warp/. This time I setup and virtual environment, and installed Django version 1.9 (ended up being 1.9.13).
Output of webpage in debug mode:
What am I doing wrong this time? |
Here a tree of my current project folder:
|
could you provide me mysite/settings.py ? |
It's seems I do have it. Also you may notice I added httpproxy in INSTALLED_APPS because I got error where it said it was missing it, so I added it above django_warp. mysite/settings.py
|
In case you ask, here is output of mysite/urls.py. You may noticed here also, I added include to " from django.conf.urls import url, ..."
|
Ok I fixed this error with help from comment: https://stackoverflow.com/a/37937755
So I added that variable setting to mysite/settings.py and ran the server again and sucessfully loaded the login page with no errors. Just need to figure out how to register/setup an account. EDIT: To create superuser, execute and follow:
|
I managed to create a new dataset and upload an images, then an error appears. PS: Does Django-Warp support jp2 (Jpeg2000)?
|
1 similar comment
I managed to create a new dataset and upload an images, then an error appears. PS: Does Django-Warp support jp2 (Jpeg2000)?
|
I'm happy you resolved install. I had no solution idea. But now you are
near to goal.
1)I would define a media directory and point to it in MEDIA_URL and
MEDIA_ROOT variables in settings.py:
https://docs.djangoproject.com/en/2.0/ref/settings/#media-root
This will not resolvs but you will get tidy uploads.
2) I never tested django_warp with sqlite/spatialite backend. I only used
postgis.
3) some multiband or alpha channeled imgs or very big imgs are not handled
very well, I would first try with light and simple 3 bands RGB jpgs
2018-02-15 0:39 GMT+01:00 soniok <notifications@github.com>:
… I managed to create a new dataset and upload an images, then an error
appears.
The image uploaded cannot be seen on georeferencing page. The left map box
stays white. I made sure not to use an .jp2 (Jpeg2000) image and used a
.PNG image.
Here are some errors from web server console, may it be an error about
paths?
PS: Does Django-Warp support jp2 (Jpeg2000)?
(warpenv) ***@***.***:~/warp$ python manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
February 14, 2018 - 23:26:58
Django version 1.9.13, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/
django/template/defaulttags.py:499: RemovedInDjango110Warning: Reversing
by dotted path is deprecated (django.contrib.auth.views.logout).
url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
[14/Feb/2018 23:27:02] "GET /warp/ HTTP/1.1" 200 6902
[14/Feb/2018 23:27:14] "GET /warp/1/ HTTP/1.1" 200 7685
Not Found: /warp/1/CACHE/images/warp/0001_s_IGNF_PVA_1-0__1935__
CCF0C-2381_1935_CAF_C-238_0002bis/054969915f465018a4fdc67d9e5c1bdb.jpg
Not Found: /warp/1/CACHE/images/warp/0002_s_output/
0a433cea60611f23f87668350f433e8d.jpg
[14/Feb/2018 23:27:14] "GET /warp/1/CACHE/images/warp/0002_s_output/
0a433cea60611f23f87668350f433e8d.jpg HTTP/1.1" 404 6110
[14/Feb/2018 23:27:14] "GET /warp/1/CACHE/images/warp/
0001_s_IGNF_PVA_1-0__1935__CCF0C-2381_1935_CAF_C-238_0002bis/
054969915f465018a4fdc67d9e5c1bdb.jpg HTTP/1.1" 404 6251
Not Found: /warp/1/CACHE/images/warp/0001_s_IGNF_PVA_1-0__1935__
CCF0C-2381_1935_CAF_C-238_0002bis/054969915f465018a4fdc67d9e5c1bdb.jpg
Not Found: /warp/1/CACHE/images/warp/0002_s_output/
0a433cea60611f23f87668350f433e8d.jpg
[14/Feb/2018 23:27:14] "GET /warp/1/CACHE/images/warp/
0001_s_IGNF_PVA_1-0__1935__CCF0C-2381_1935_CAF_C-238_0002bis/
054969915f465018a4fdc67d9e5c1bdb.jpg HTTP/1.1" 404 6251
[14/Feb/2018 23:27:14] "GET /warp/1/CACHE/images/warp/0002_s_output/
0a433cea60611f23f87668350f433e8d.jpg HTTP/1.1" 404 6110
/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/
django/template/smartif.py:168: RemovedInDjango110Warning: Operator '='
is deprecated and will be removed in Django 1.10. Use '==' instead.
mapped_tokens.append(self.translate_token(token))
[14/Feb/2018 23:27:19] "GET /warp/imgset/2/ HTTP/1.1" 200 35849
Not Found: /warp/imgset/2/warp/0002_s_output.png
[14/Feb/2018 23:27:19] "GET /warp/imgset/2/warp/0002_s_output.png?dum=9576136
HTTP/1.1" 404 6005
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHMgg5gEt2zH8KGV70bZTe2XjKw12aXcks5tU26UgaJpZM4SEtc2>
.
|
Ok everything seems to work. I'm able to upload, georeference and generate .tiff, download-dataset(georeferenced .tiff). All the thumbnails are working.
The only error I have now, is I cannot delete an image from a dataset. When I click on X to delete, then confirm the alert/confirm box, I get this error:
PS: Thanks for your help and time Enricofer. |
Thanks @soniok you made a great work! Now you master django like a boss!
What about putting your effort in a step by step tutorial? I would link it
from repository.
2018-02-15 19:09 GMT+01:00 soniok <notifications@github.com>:
… Ok everything seems to work. I'm able to upload, georeference and generate
.tiff, download-dataset(georeferenced .tiff). All the thumbnails are
working.
Here are the corrections a made to fix wrong path to images/thumbnails:
- Add to end of mysite/settings.py
#My folder containing django project:
MEDIA_ROOT = '/home/mapwarper/warp/'
#Url base that will reference to media content I guess. I named it 'img':
MEDIA_URL = 'http://127.0.0.1:8000/warp/img/'
- Add to end of django_warp/urls.py
Need this for above to work
url(r'^img/(?P.*)$', 'django.views.static.serve', {'document_root':
settings.MEDIA_ROOT}),
The only error I have now, is I cannot delete an image from a dataset.
When I click on X to delete, then confirm the alert/confirm box, I get this
error:
http://dpaste.com/11XPXJG
Traceback:
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/db/backends/utils.py"
in execute
64. return self.cursor.execute(sql, params)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/
django/db/backends/sqlite3/base.py" in execute
323. return Database.Cursor.execute(self, query, params)
The above exception (NOT NULL constraint failed: django_warp_datasets.transparency)
was the direct cause of the following exception:
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/core/handlers/base.py"
in get_response
149. response = self.process_exception_by_middleware(e, request)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/core/handlers/base.py"
in get_response
147. response = wrapped_callback(request, *callback_args,
**callback_kwargs)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/
django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "/home/mapwarper/warp/django_warp/views.py" in trash_image
368. trash_dataset.save()
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/db/models/base.py"
in save
708. force_update=force_update, update_fields=update_fields)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/db/models/base.py"
in save_base
736. updated = self._save_table(raw, cls, force_insert, force_update,
using, update_fields)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/db/models/base.py"
in _save_table
820. result = self._do_insert(cls._base_manager, using, fields,
update_pk, raw)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/db/models/base.py"
in _do_insert
859. using=using, raw=raw)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/db/models/manager.py"
in manager_method
122. return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/db/models/query.py"
in _insert
1039. return query.get_compiler(using=using).execute_sql(return_id)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/
django/db/models/sql/compiler.py" in execute_sql
1060. cursor.execute(sql, params)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/db/backends/utils.py"
in execute
79. return super(CursorDebugWrapper, self).execute(sql, params)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/db/backends/utils.py"
in execute
64. return self.cursor.execute(sql, params)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/db/utils.py"
in *exit*
95. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/utils/six.py"
in reraise
685. raise value.with_traceback(tb)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/django/db/backends/utils.py"
in execute
64. return self.cursor.execute(sql, params)
File "/home/mapwarper/warp/warpenv/lib/python3.5/site-packages/
django/db/backends/sqlite3/base.py" in execute
323. return Database.Cursor.execute(self, query, params)
Exception Type: IntegrityError at /warp/trashimage/2/
Exception Value: NOT NULL constraint failed: django_warp_datasets.
transparency
PS: Thanks for your help and time Enricofer.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHMgg38S_DjNT3Xyr2h6r8ll4fZT1dCJks5tVHL2gaJpZM4SEtc2>
.
|
Hello @enricofer,
I'm having and issue trying to install django-warp on a Ubuntu 16.04 LTS (in VirtualBox Linux Host) update to date.
No problem installing dependencies but could not install Django 1.9, instead installed Django 2.0.2.
What am I missing? Could anyone care to help guide me?
Thanks in advance,
Best regards,
Here is the output of history:
Software Version Information:
Error msg when installing Django-warp:
The text was updated successfully, but these errors were encountered: