[ckan-dev] CKAN 2.0.3 ImportError: No module named fanstatic

Nigel Babu nigel.babu at okfn.org
Tue May 20 03:48:01 UTC 2014


When you call "sudo paster" from inside a virtualenv, you're actually not
calling the right paster. What happens when you try

sudo /usr/lib/ckan/default/bin/paster db dump
--config=/etc/ckan/default/production.ini ugis_ckan_database.pg_dump

Nigel Babu
Developer, Open Knowledge


On 20 May 2014 02:15, CKAN UGIS <ckan.ugis at gmail.com> wrote:

> Hello,
>
> I'm now a maintainer of CKAN 2.0.3 instance. I didn't install it, but it
> looks like it's been installed from package.
>
> I'm trying to upgrade to 2.2, but I'm getting an ImportError when I try to
> make a database dump. The weird thing is that pip freeze shows that
> fanstatic is installed.
>
> Here's what I did:
>
> student at CKAN:~$ . /usr/lib/ckan/default/bin/activate
> (default)student at CKAN:~$ cd /usr/lib/ckan/default/src/ckan
> (default)student at CKAN:/usr/lib/ckan/default/src/ckan$ sudo paster db dump
> --config=/etc/ckan/default/production.ini ugis_ckan_database.pg_dump
> sudo: unable to resolve host CKAN
> [sudo] password for student:
> Traceback (most recent call last):
>   File "/usr/bin/paster", line 4, in <module>
>     command.run()
>   File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line
> 103, in run
>     command = commands[command_name].load()
>   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in
> load
>     entry = __import__(self.module_name, globals(),globals(), ['__name__'])
>   File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 10, in
> <module>
>     import ckan.lib.fanstatic_resources as fanstatic_resources
>   File "/usr/lib/ckan/default/src/ckan/ckan/lib/fanstatic_resources.py",
> line 6, in <module>
>     from fanstatic import Library, Resource, Group, get_library_registry
> ImportError: No module named fanstatic
> (default)student at CKAN:/usr/lib/ckan/default/src/ckan$ pip freeze
> Babel==0.9.6
> Beaker==1.6.4
> FormAlchemy==1.4.2
> FormEncode==1.2.6
> Genshi==0.6
> Jinja2==2.6
> Mako==0.9.0
> MarkupSafe==0.15
> Pairtree==0.7.1-T
> Paste==1.7.5.1
> PasteDeploy==1.5.0
> PasteScript==1.7.5
> Pygments==1.6
> Pylons==0.9.7
> Routes==1.13
> SQLAlchemy==0.7.8
> Tempita==0.5.1
> WebError==0.10.3
> WebHelpers==1.3
> WebOb==1.0.8
> WebTest==1.4.3
> apachemiddleware==0.1.1
> argparse==1.2.1
> -e git+
> https://github.com/okfn/ckan@b58fcc9b0474d71d33b840897e417fdbc716c90a#egg=ckan-dev
> decorator==3.4.0
> distribute==0.6.24
> fanstatic==0.12
> nose==1.3.0
> ofs==0.4.1
> psycopg2==2.4.5
> python-dateutil==1.5
> python-openid==2.2.5
> pyutilib.component.core==4.5.3
> repoze.lru==0.6
> repoze.who==1.0.19
> repoze.who-friendlyform==1.0.8
> repoze.who.plugins.openid==0.5.3
> requests==1.1.0
> simplejson==3.3.1
> solrpy==0.9.5
> sqlalchemy-migrate==0.7.2
> vdm==0.11
> wsgiref==0.1.2
> zope.interface==4.0.1
>
> Can you give any hints on how to solve this?
>
> Thanks,
> Dmitry.
>
> _______________________________________________
> 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/20140520/3bd8b8ba/attachment-0003.html>


More information about the ckan-dev mailing list