[ckan-dev] Antwort: Python 2.7 and CKAN 2.5

Florian.Brucker at mb.karlsruhe.de Florian.Brucker at mb.karlsruhe.de
Wed Apr 6 05:23:50 UTC 2016


Hi Jenny,

Not sure if this is related to your problem but I've gotten the same error
when importing CKAN plugins that had faulty namespace package declarations
(see https://github.com/ckan/ckan/issues/2893). It seems that you're
running MacOS which I don't have any experience with, but can you try to
execute the following command in an interactive Python shell?

    import ckanext

If that works, can you try to import one of the CKAN extensions that you're
using? For example, if you're using the `pdf_view` extension then you could
try

    import ckanext.pdfview

If you get errors running these commands then can you please describe how
you've installed CKAN (for example, it seems that you're not using a
virtualenv) and which extensions you have installed?


Regards,
Florian


"ckan-dev" <ckan-dev-bounces at lists.okfn.org> schrieb am 04.04.2016
22:18:34:

> Von: Hong Jing <jenny.jing at nyu.edu>
> An: ckan-dev at lists.okfn.org,
> Datum: 04.04.2016 22:18
> Betreff: [ckan-dev] Python 2.7 and CKAN 2.5
> Gesendet von: "ckan-dev" <ckan-dev-bounces at lists.okfn.org>
>
> Hi, All:
>
> I found this page about loading data into CKAN( http://
> docs.ckan.org/en/ckan-1.7.1/loading-data.html )
> -         Import Data with the CKAN API. You can use the CKAN API to
> script import. To simplify matters, we offer provide standard
> loading scripts for Google Spreadsheets, CSV and Excel.
> But I got some error message while I was running python after install
ckan2.5:
> pip install ckan
> then just running python
> computer:~ shellu$ python
> I get the following error:
> Error processing line 2 of /usr/local/Cellar/python/2.7.9/
> Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
> packages/ckan-2.5.2-py2.7-nspkg.pth:
>
>   Traceback (most recent call last):
>     File "/usr/local/Cellar/python/2.7.9/Frameworks/
> Python.framework/Versions/2.7/lib/python2.7/site.py", line 152, in
addpackage
>       exec line
>     File "<string>", line 1, in <module>
>   KeyError: 'ckanext'
>
> Remainder of file ignored
> Error processing line 2 of /usr/local/lib/python2.7/site-packages/
> ckan-2.5.2-py2.7-nspkg.pth:
>
>   Traceback (most recent call last):
>     File "/usr/local/Cellar/python/2.7.9/Frameworks/
> Python.framework/Versions/2.7/lib/python2.7/site.py", line 152, in
addpackage
>       exec line
>     File "<string>", line 1, in <module>
>   KeyError: 'ckanext'
>
> Remainder of file ignored
> Python 2.7.9 (default, Jan  7 2015, 11:49:12)
> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>>
> KeyboardInterrupt
> >>>
>
> Does anyone have any idea what might cause the problem?
>
> Thanks.
>
> Jenny
> -----------------------------------------------------------
> Research Information Scientist,
> Center for Urban Science + Progress, NYU
> https://datahub.cusp.nyu.edu/
>
> 646-997-0519
>  _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160406/480e8482/attachment-0003.html>


More information about the ckan-dev mailing list