[ckan-dev] Datastore setup for ckan 2.0

Dominik Moritz dominik.moritz at okfn.org
Fri Mar 8 15:25:44 UTC 2013


Hi,

could you go into a little bit more detail what you've done? Have you installed the datastorer properly (see https://github.com/okfn/ckanext-datastorer)? Did you wait for the datastorer to finish its work? Is the recline preview enabled in your .ini file?

Dominik

On 7 Mar 2013, at 15:59, Stefán Þór Finnsson <stefan.thor.finnsson at reykjavik.is> wrote:

> The fun goes on :) When I click preview for csv or xlsx file it get this:
> 
> This resource cannot be previewed.  More details...
> No handler defined for data type: xls.
> 
> When filestore is in place I can upload files and download them, that works
> 
> When I have added datastore to the party and running celeryd I should see preview of the file and be able to do something with it on the page? Or not? I´m in the dark with the functions?
> 
> -----Original Message-----
> From: ckan-dev-bounces at lists.okfn.org [mailto:ckan-dev-bounces at lists.okfn.org] On Behalf Of Stefán Þór Finnsson
> Sent: 6. mars 2013 14:19
> To: CKAN Development Discussions
> Subject: Re: [ckan-dev] Datastore setup for ckan 2.0
> 
> Great, somehow I did not see this document :) thanks :)
> 
> -----Original Message-----
> From: ckan-dev-bounces at lists.okfn.org [mailto:ckan-dev-bounces at lists.okfn.org] On Behalf Of Dominik Moritz
> Sent: 5. mars 2013 17:28
> To: CKAN Development Discussions
> Subject: Re: [ckan-dev] Datastore setup for ckan 2.0
> 
> I hope this answers all your questions: http://docs.ckan.org/en/latest/datastore.html ;-)
> 
> On 5 Mar 2013, at 16:18, Stefán Þór Finnsson <stefan.thor.finnsson at reykjavik.is> wrote:
> 
>> Hi
>> 
>> Thanks for this :) - I have change the ckanext/datastore/plugin.py file and now the system starts and the ckan page does work. 
>> 
>> But, I can find any good info about how to use the datastore compared to use the filestore, do I have to have both enabled? How do I put data to the datastore? Do I need the datastorer plugin or is there another way to use it?
>> 
>> Would be nice if someone could clear this out for me :)
>> 
>> -----Original Message-----
>> From: ckan-dev-bounces at lists.okfn.org [mailto:ckan-dev-bounces at lists.okfn.org] On Behalf Of Dominik Moritz
>> Sent: 28. febrúar 2013 18:18
>> To: CKAN Development Discussions
>> Subject: Re: [ckan-dev] Datastore setup for ckan 2.0
>> 
>> Hi,
>> 
>> looks like your postgres version does not have support for the concat function. I submitted a pull request [1] that replaces the concat function. You could either cherry-pick the commit, get the patch or wait for it to be in master. 
>> 
>> I'm sorry that we did'n catch that during our tests. 
>> 
>> Cheers,
>> Dominik
>> 
>> [1] https://github.com/okfn/ckan/pull/514
>> 
>> On 28 Feb 2013, at 17:53, Stefán Þór Finnsson <stefan.thor.finnsson at reykjavik.is> wrote:
>> 
>>> Hello :)
>>> 
>>> When I have added the datastore extension and done the config for it I get this error in my ckan log and the system does not work. Without the datastore it works fine.  I´m lost in what could be causing this error, anyone here with a quick answer for me :)
>>> 
>>> [Thu Feb 28 16:46:48 2013] [info] [client 82.112.70.95] mod_wsgi (pid=28703, process='', application='ckan-test|'): Loading WSGI script '/usr/local/ckan-test/pyenv/bin/ckan-test.py'.
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95] mod_wsgi (pid=28703): Target WSGI script '/usr/local/ckan-test/pyenv/bin/ckan-test.py' cannot be loaded as Python module.
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95] mod_wsgi (pid=28703): Exception occurred processing WSGI script '/usr/local/ckan-test/pyenv/bin/ckan-test.py'.
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95] Traceback (most recent call last):
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/bin/ckan-test.py", line 11, in <module>
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     application = loadapp('config:%s' % config_filepath)
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     return loadobj(APP, uri, name=name, **kw)
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     return context.create()
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 710, in create
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     return self.object_type.invoke(self)
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     return fix_call(context.object, context.global_conf, **context.local_conf)
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/lib/python2.6/site-packages/paste/deploy/util.py", line 56, in fix_call
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     val = callable(*args, **kw)
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/src/ckan/ckan/config/middleware.py", line 54, in make_app
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     load_environment(global_conf, app_conf)
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/src/ckan/ckan/config/environment.py", line 349, in load_environment
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     plugin.configure(config)
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/src/ckan/ckanext/datastore/plugin.py", line 68, in configure
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     self._create_alias_table()
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/src/ckan/ckanext/datastore/plugin.py", line 206, in _create_alias_table
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     connection.execute(create_alias_table_sql)
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1449, in execute
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     params)
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1628, in _execute_text
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     statement, parameters
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     context)
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     context)
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]   File "/usr/local/ckan-test/pyenv/lib/python2.6/site-packages/sqlalchemy/engine/default.py", line 331, in do_execute
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]     cursor.execute(statement, parameters)
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95] ProgrammingError: (ProgrammingError) function concat(name, name) does not exist
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95] LINE 3:                 substr(md5(concat(dependee.relname, dependen...
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]                                    ^
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95] HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
>>> [Thu Feb 28 16:46:49 2013] [error] [client 82.112.70.95]  'CREATE OR REPLACE VIEW "_table_metadata" AS \\n            SELECT DISTINCT\\n                substr(md5(concat(dependee.relname, dependent.relname)), 0, 17) AS "_id",\\n                dependee.relname AS name,\\n                dependee.oid AS oid,\\n                dependent.relname AS alias_of\\n                -- dependent.oid AS oid\\n            FROM\\n                pg_class AS dependee\\n                LEFT OUTER JOIN pg_rewrite AS r ON r.ev_class = dependee.oid\\n                LEFT OUTER JOIN pg_depend AS d ON d.objid = r.oid\\n                LEFT OUTER JOIN pg_class AS dependent ON d.refobjid = dependent.oid\\n            WHERE\\n                (dependee.oid != dependent.oid OR dependent.oid IS NULL) AND\\n                (dependee.relname IN (SELECT tablename FROM pg_catalog.pg_tables)\\n                    OR dependee.relname IN (SELECT viewname FROM pg_catalog.pg_views)) AND\\n                dependee.relnamespace = (SELECT oid FROM pg_namespace WHERE nspname=\\'public\\')\\n            ORDER BY dependee.oid DESC;\\n        ' {}
>>> 
>>> __________________________________
>>> Reglur um trúnað í tölvupóstsamskiptum: http://www.reykjavik.is/trunadur
>>> 
>>> Leiddu hugann að umhverfinu áður en þú prentar út þennan tölvupóst. Prentaðu á báðar hliðar í svarthvítu ef nauðsyn krefur.
>>> _______________________________________________
>>> 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
>> 
>> _______________________________________________
>> 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
> 
> _______________________________________________
> 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





More information about the ckan-dev mailing list