[ckan-dev] ckan-dev Digest, Vol 34, Issue 18
Aaron McGlinchy
McGlinchyA at landcareresearch.co.nz
Mon Aug 12 02:35:02 UTC 2013
$166
-----Original Message-----
From: ckan-dev-bounces at lists.okfn.org [mailto:ckan-dev-bounces at lists.okfn.org] On Behalf Of ckan-dev-request at lists.okfn.org
Sent: Friday, 9 August 2013 10:07 p.m.
To: ckan-dev at lists.okfn.org
Subject: ckan-dev Digest, Vol 34, Issue 18
Send ckan-dev mailing list submissions to
ckan-dev at lists.okfn.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.okfn.org/mailman/listinfo/ckan-dev
or, via email, send a message with subject or body 'help' to
ckan-dev-request at lists.okfn.org
You can reach the person managing the list at
ckan-dev-owner at lists.okfn.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of ckan-dev digest..."
Today's Topics:
1. Re: Using e-mails as usernames (Vitor Baptista)
2. Installation of googleanalytics extension fails.
(Henrik Aagaard S?rensen)
3. Re: uppercase file format (David Raznick)
4. Re: ...not allowed by Access-Control-Allow-Origin, even
though resource_proxy is enabled. (Adri? Mercader)
5. Re: ...not allowed by Access-Control-Allow-Origin, even
though resource_proxy is enabled. (Dominik Moritz)
----------------------------------------------------------------------
Message: 1
Date: Thu, 8 Aug 2013 20:40:19 -0300
From: Vitor Baptista <vitor at vitorbaptista.com>
Subject: Re: [ckan-dev] Using e-mails as usernames
To: CKAN Development Discussions <ckan-dev at lists.okfn.org>
Message-ID:
<CANybZper+tHs5MZBSOMjdLhus8bbecRp3GEWe8c1Mpump1eOmw at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Aaron,
I'm not sure how spread is this functionality but, with GMail, you can add a + to create many different emails that all go to the same account (i.e.
me+testuser at gmail.com, me+testadmin at gmail.com, all go to me at gmail.com).
Also, just for testing purposes, mailinator.com is a great tool.
The problem with using just the left of the @ is that it's not guaranteed to be unique. Maybe adding a random number after the username? I guess, for this card, it's the best solution, so I could finish it without being blocked by this discussion.
I still think it's an useful change, though :-)
Cheers,
V?tor Baptista
Developer | http://vitorbaptista.com | LinkedIn<http://www.linkedin.com/in/vitorbaptista>|
@vitorbaptista <http://twitter.com/vitorbaptista>
The Open Knowledge Foundation <http://okfn.org>
*Empowering through Open Knowledge*
http://okfn.org/ | @okfn <http://twitter.com/okfn> | OKF on Facebook<https://www.facebook.com/OKFNetwork> | Blog <http://blog.okfn.org/> | Newsletter<http://okfn.org/about/newsletter/>
2013/8/8 Aaron McGlinchy <McGlinchyA at landcareresearch.co.nz>
> Hi - just a comment re this, whilst we are testing out CKAN and
> learning how it works (its new to us) I have created several users,
> with different usernames but since they're all me I use the same email
> address. I do this so I can experience what it is like for a user
> with different permission levels rather than just me as Sysadmin.
>
> I can see both sides of the discussion, but just noting the use case
> above as part of the mix.
>
> >> The problem is that I can't create a user without an username and a
> >> password. To work around this, I'll set them to random values. For
> >> the password, it's OK. But for the username, it's weird.
>
> Could you not parse the email address so that the text to the left of
> the @symbol was the Username - that would presumably be text that made
> some sense to the user?
>
> Cheers
> Aaron
>
> ________________________________
>
> Please consider the environment before printing this email
> Warning: This electronic message together with any attachments is
> confidential. If you receive it in error: (i) you must not read, use,
> disclose, copy or retain it; (ii) please contact the sender
> immediately by reply email and then delete the emails.
> The views expressed in this email may not be those of Landcare
> Research New Zealand Limited. http://www.landcareresearch.co.nz
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130808/01fd58c8/attachment-0001.htm>
------------------------------
Message: 2
Date: Fri, 9 Aug 2013 10:10:56 +0200
From: Henrik Aagaard S?rensen <BU1G at tmf.kk.dk>
Subject: [ckan-dev] Installation of googleanalytics extension fails.
To: CKAN Development Discussions <ckan-dev at lists.okfn.org>
Message-ID:
<95DD7D5AB5B1A64BA977B280E2A37F5A500B9DC984 at KK-MAILBOX01.kk.dk>
Content-Type: text/plain; charset="iso-8859-1"
I've installed other extension successfully, but the googleanalytics fails due to problems with github. I get the following error:
Obtaining ckanext-googleanalytics from git+http://github.com/okfn/ckanext-googleanalytics.git#egg=ckanext-googleanalytics
Cloning http://github.com/okfn/ckanext-googleanalytics.git to ./ckanext-googleanalytics
error: Couldn't resolve host 'github.com' while accessing http://github.com/okfn/ckanext-googleanalytics.git/info/refs
fatal: HTTP request failed
I've tried with git+http://github.com, git+https://github.com and git+git://github.com, but without any luck.
Any idea? Is the problem with the extension or with github?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130809/151640fa/attachment-0001.htm>
------------------------------
Message: 3
Date: Fri, 9 Aug 2013 10:38:22 +0100
From: David Raznick <david.raznick at okfn.org>
Subject: Re: [ckan-dev] uppercase file format
To: CKAN Development Discussions <ckan-dev at lists.okfn.org>
Message-ID:
<CALMo=h9rioLaQVo1xNVpPH3pkpYGnag+fZfCv_Acf+eO+8+ibg at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hello
There is the after show hook you can do this in an extension.
Look here lines 369 to 372
https://github.com/okfn/ckanext-geodatagov/blob/master/ckanext/geodatagov/plugins.py#L369
This is a complicated example as it does it for many formats but you may want to reuse the logic as it covers a wide range of formats.
https://github.com/okfn/ckanext-geodatagov/blob/master/ckanext/geodatagov/plugins.py#L57
Thanks
David
On 8 August 2013 22:10, Ian Ward <ian at excess.org> wrote:
> Hi Isabel,
>
> That little bit of magic is buried in model_dictize.py:
>
> https://github.com/okfn/ckan/blob/master/ckan/lib/dictization/model_di
> ctize.py#L105
>
> Unfortunately it's not in a place that it can be overridden without
> changing the CKAN source, such as a validator in the schema.
>
> On Wed, Aug 7, 2013 at 7:17 AM, Isabel Ruiz <isaruizmellado at gmail.com>
> wrote:
> > Hi!
> >
> > I have installed CKAN 2.0.1
> >
> > I have added resources, that contains differents files formats (csv,
> > pdf,
> > zip) .
> >
> > I made this mistake:
> >
> > First: I added pdf files, I have written 'PDF' in file type.
> > Second: I added csv files, I have written 'csv' in file type.
> >
> >
> > I see CKAN files formats filters PDF (uppercase) and csv (lowercase)
> files.
> >
> > I need change format file csv (lowercase) to CSV (uppercase).
> > I try:
> > - edit resource and change csv to CSV type file, but it changes
> > automatically to lowercase again.
> >
> > How can I change this?
> >
> >
> > Thanks!
> >
> >
> >
> >
> >
> >
> > --
> > Isabel M. Ruiz Mellado
> > http://about.me/isabelruiz
> >
> > _______________________________________________
> > ckan-dev mailing list
> > ckan-dev at lists.okfn.org
> > http://lists.okfn.org/mailman/listinfo/ckan-dev
> > Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
> >
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130809/968aa1b8/attachment-0001.htm>
------------------------------
Message: 4
Date: Fri, 9 Aug 2013 10:44:57 +0100
From: Adri? Mercader <adria.mercader at okfn.org>
Subject: Re: [ckan-dev] ...not allowed by Access-Control-Allow-Origin,
even though resource_proxy is enabled.
To: CKAN Development Discussions <ckan-dev at lists.okfn.org>, Dominik
Moritz <dominik.moritz at okfn.org>
Message-ID:
<CAGJR8i+6Ux218HLFMLtuLvAnoLhGFBm8eJONO=POTpaGBYa-aA at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi Henrik,
Ignore the Access-Control-Allow-Origin error, this is caused because the way the GeoJSON preview is implemented it tries to do a CORS request first before trying the resource proxy. See eg
http://demo.ckan.org/dataset/test-ntest/resource/bccc8d4e-e8bc-4248-91ff-63ba1528d1d4
where you also get the error but the file is loaded fine.
I suspect there is a problem on the proxying itself. Does this happen on large GeoJSON files or on all of them?
Next versions of CKAN due on Tuesday (2.0.2 and 2.1) add support for streaming on the resource proxy [1], perhaps that will help although I'm not entirely familiar with this part of the code, Dominik may know more about it.
You could also try to increase the timeout limit on nginx.
Hope this helps,
Adri?
p.d. Great site btw!
[1] https://github.com/okfn/ckan/pull/989
On 8 August 2013 07:45, Henrik Aagaard S?rensen <BU1G at tmf.kk.dk> wrote:
> I get the following error:
>
>
>
> XMLHttpRequest cannot load
> http://wfs-kbhkort.kk.dk/k101/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=k101:groenne_cykelruter&outputFormat=json&SRSNAME=EPSG:4326.
> Origin http://data.kk.dk is not allowed by Access-Control-Allow-Origin.
>
>
>
> Even though resource_proxy is enabled, which results in gateway
> timeout (hopefully).
>
>
>
> The site is on
> http://data.kk.dk/dataset/gronne-cykelruter/resource/8d64d2e0-00d1-4ff
> 4-a36d-4f0a34949576
>
>
>
> Can anyone help me out on how to solve the issue?
>
>
>
> This is the error-log:
>
> [Thu Aug 08 08:44:38 2013] [error] [client 127.0.0.1] mod_wsgi (pid=1669):
> Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'.
>
> [Thu Aug 08 08:44:38 2013] [error] [client 127.0.0.1] IOError: failed
> to write data
>
> [Thu Aug 08 08:44:38 2013] [error] 2013-08-08 08:44:38,254 INFO
> [ckan.lib.base] /api/i18n/da render time 0.027 seconds
>
> [Thu Aug 08 08:44:38 2013] [error] 2013-08-08 08:44:38,401 INFO
> [ckanext.resourceproxy.controller] Proxify resource
> 8d64d2e0-00d1-4ff4-a36d-4f0a34949576
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
------------------------------
Message: 5
Date: Fri, 9 Aug 2013 12:06:48 +0200
From: Dominik Moritz <dominik.moritz at okfn.org>
Subject: Re: [ckan-dev] ...not allowed by Access-Control-Allow-Origin,
even though resource_proxy is enabled.
To: CKAN Development Discussions <ckan-dev at lists.okfn.org>
Message-ID: <1F9212CD-61E5-414C-B293-C23335DA9880 at okfn.org>
Content-Type: text/plain; charset="iso-8859-1"
Hey,
In case you are interested in the source code, you can find the interesting part at [1].
What surprises me is that I get a `504 Gateway Time-out` error from nginx. However, the file is not very large (just 351k) and works perfectly fine in my local CKAN and on demo [2]. I don't think that an increased timeout will help since the file is small. Hopefully the 2.0.2/2.1 release will the issue.
Cheers,
Dominik
[1] https://github.com/okfn/ckanext-spatial/blob/master/ckanext/spatial/public/js/geojson_preview.js#L32
[2] http://demo.ckan.org/dataset/geojson-dk/resource/12916ca8-27f0-4e8b-b366-8c1f50a9bd12
On 9 Aug 2013, at 11:44, Adri? Mercader <adria.mercader at okfn.org> wrote:
> Hi Henrik,
>
> Ignore the Access-Control-Allow-Origin error, this is caused because
> the way the GeoJSON preview is implemented it tries to do a CORS
> request first before trying the resource proxy. See eg
> http://demo.ckan.org/dataset/test-ntest/resource/bccc8d4e-e8bc-4248-91
> ff-63ba1528d1d4 where you also get the error but the file is loaded
> fine.
>
> I suspect there is a problem on the proxying itself. Does this happen
> on large GeoJSON files or on all of them?
>
> Next versions of CKAN due on Tuesday (2.0.2 and 2.1) add support for
> streaming on the resource proxy [1], perhaps that will help although
> I'm not entirely familiar with this part of the code, Dominik may know
> more about it.
>
> You could also try to increase the timeout limit on nginx.
>
> Hope this helps,
>
> Adri?
>
> p.d. Great site btw!
>
> [1] https://github.com/okfn/ckan/pull/989
>
> On 8 August 2013 07:45, Henrik Aagaard S?rensen <BU1G at tmf.kk.dk> wrote:
>> I get the following error:
>>
>>
>>
>> XMLHttpRequest cannot load
>> http://wfs-kbhkort.kk.dk/k101/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=k101:groenne_cykelruter&outputFormat=json&SRSNAME=EPSG:4326.
>> Origin http://data.kk.dk is not allowed by Access-Control-Allow-Origin.
>>
>>
>>
>> Even though resource_proxy is enabled, which results in gateway
>> timeout (hopefully).
>>
>>
>>
>> The site is on
>> http://data.kk.dk/dataset/gronne-cykelruter/resource/8d64d2e0-00d1-4f
>> f4-a36d-4f0a34949576
>>
>>
>>
>> Can anyone help me out on how to solve the issue?
>>
>>
>>
>> This is the error-log:
>>
>> [Thu Aug 08 08:44:38 2013] [error] [client 127.0.0.1] mod_wsgi (pid=1669):
>> Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'.
>>
>> [Thu Aug 08 08:44:38 2013] [error] [client 127.0.0.1] IOError: failed
>> to write data
>>
>> [Thu Aug 08 08:44:38 2013] [error] 2013-08-08 08:44:38,254 INFO
>> [ckan.lib.base] /api/i18n/da render time 0.027 seconds
>>
>> [Thu Aug 08 08:44:38 2013] [error] 2013-08-08 08:44:38,401 INFO
>> [ckanext.resourceproxy.controller] Proxify resource
>> 8d64d2e0-00d1-4ff4-a36d-4f0a34949576
>>
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>>
Dominik Moritz
CKAN developer | skype: d.moritz | @doobly_doo The Open Knowledge Foundation Empowering through Open Knowledge http://okfn.org/ | @okfn | http://ckan.org | @CKANproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130809/a83a7073/attachment.pgp>
------------------------------
_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org
http://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: http://lists.okfn.org/mailman/optionss/ckan-dev
End of ckan-dev Digest, Vol 34, Issue 18
****************************************
________________________________
Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz
More information about the ckan-dev
mailing list