No subject
Sun Mar 31 09:34:23 UTC 2013
the pip +e option. you can run 'python setup.py develop' from within your
ckan source. you might also consider a git clone of the repo and install
from that (again using 'python setup.py develop')
If you do not get an import error, the problem may be in just how your
launching. Paster has to run from the root of the project src (which it
looks like your doing), but an easy way to test is to just run the command
'paster' with no args and see that there are a number of CKAN options
available (celeryd, color, db, less, sysadmin...).
-Dave
On Tue, Aug 27, 2013 at 7:17 PM, Eduardo Bejar <wonka at fundapi.org> wrote:
> >Did you create and activate (i.e. source) your
> >virtualenv with the following command?
> >. /usr/lib/ckan/default/bin/activate
>
> Yes, here's what I did:
>
> cd /usr/lib/ckan/default/src/ckan/
> . /usr/lib/ckan/default/bin/act=EDvate
> (default) $ sudo paster db init -c /etc/ckan/default/development.ini
>
> And here's the traceback:
>
> 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
> 104,
> in run
> invoke(command, command_name, options, args[1:])
> File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line
> 143,
> in invoke
> exit_code =3D runner.run(args)
> File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line
> 238,
> in run
> result =3D self.command()
> File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 124, in
> command
> self._load_config()
> File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 86, in
> _load_config
> load_environment(conf.global_conf, conf.local_conf)
> File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line
> 135, in load_environment
> p.load_all(config)
> File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 95, in
> load_all
> find_user_plugins(config)
> File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 178, i=
n
> find_user_plugins
> plugins.extend(ep.load() for ep in entry_points)
> File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 178, i=
n
> <genexpr>
> plugins.extend(ep.load() for ep in entry_points)
> File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in
> load
> entry =3D __import__(self.module_name, globals(),globals(), ['__name_=
_'])
> File "/home/web/src/ckan/ckanext/textpreview/plugin.py", line 5, in
> <module>
> from ckan.common import json
> ImportError: No module named common
>
> Any other idea? Thanks,
>
> Edo
>
> ---
>
> De: ckan-dev-bounces at lists.okfn.org [mailto:
> ckan-dev-bounces at lists.okfn.org]
> En nombre de Stefan Oderbolz
> Enviado el: martes, 27 de agosto de 2013 16:16
> Para: CKAN Development Discussions
> Asunto: Re: [ckan-dev] No module named common
>
> Did you create and activate (i.e. source) your virtualenv with the
> following
> command?
>
> . /usr/lib/ckan/default/bin/activate
>
> your command prompt should change to something like "(default)$"
>
> On Tue, Aug 27, 2013 at 9:42 PM, Eduardo Bejar <wonka at fundapi.org> wrote:
> Hello,
>
> Continuing installing CKAN 2.2 on an clean install Ubuntu 12.04 64-bit
> server. Following the Install from source guide
> (http://docs.ckan.org/sv/latest/install-from-source.html), now when I try
> step 6:
>
> paster db init -c /etc/ckan/default/development.ini
>
> I get:
>
> ImportError: No module named common
>
> Any ideas about what should I try? Previously this line gave me a
> json_preview error which I solved with your suggestions about changing it
> to
> text_preview.
>
> Thank you for your comments,
>
> Edo
>
>
>
> _______________________________________________
> 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
>
>
>
>
> --
> Liip AG // Feldstrasse 133 // CH-8004 Zurich
> Tel +41 43 500 39 80 // GnuPG 0x7B588C67 // www.liip.ch
>
>
>
> _______________________________________________
> 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
>
--=20
Dave Caraway
Owner
Fog Mine
dave at fogmine.com
Cell: (937) 985-0867
Fax: (866) 238-3120
--001a11c1c0ae3dc8ce04e50bffcc
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hi Edo,<div><br></div><div>With your virtualenv activated,=
are you able to import the module from interactive python session?</div><d=
iv><br></div><div>1.) python</div><div>2.) >>>=A0<span style=3D"fo=
nt-family:arial,sans-serif;font-size:13px">from ckan.common import json</sp=
an></div>
<div><br></div><div><span style=3D"font-family:arial,sans-serif;font-size:1=
3px">If you get an import error still, that means that ckan isn't insta=
lled corredctly in your virtual environment. You might want to reinstall ck=
an. From your src being inside your virtualenv, I believe you installed usi=
ng the pip +e option. you can run 'python setup.py develop' from wi=
thin your ckan source. you might also consider a git clone of the repo and =
install from that (again using 'python setup.py develop')</span></d=
iv>
<div><span style=3D"font-family:arial,sans-serif;font-size:13px"><br></span=
></div><div><span style=3D"font-family:arial,sans-serif;font-size:13px">If =
you do not get an import error, the problem may be in just how your launchi=
ng. Paster has to run from the root of the project src (which it looks like=
your doing), but an easy way to test is to just run the command 'paste=
r' with no args and see that there are a number of CKAN options availab=
le (celeryd, color, db, less, sysadmin...).</span></div>
<div><span style=3D"font-family:arial,sans-serif;font-size:13px"><br></span=
></div><div><span style=3D"font-family:arial,sans-serif;font-size:13px">-Da=
ve</span></div></div><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">
On Tue, Aug 27, 2013 at 7:17 PM, Eduardo Bejar <span dir=3D"ltr"><<a hre=
f=3D"mailto:wonka at fundapi.org" target=3D"_blank">wonka at fundapi.org</a>><=
/span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex">
<div class=3D"im">>Did you create and activate (i.e. source) your<br>
>virtualenv with the following command?<br>
>. /usr/lib/ckan/default/bin/activate<br>
<br>
</div>Yes, here's what I did:<br>
<br>
cd /usr/lib/ckan/default/src/ckan/<br>
. /usr/lib/ckan/default/bin/act=EDvate<br>
(default) $ sudo paster db init -c /etc/ckan/default/development.ini<br>
<br>
And here's the traceback:<br>
<br>
Traceback (most recent call last):<br>
=A0 File "/usr/bin/paster", line 4, in <module><br>
=A0 =A0 command.run()<br>
=A0 File "/usr/lib/python2.7/dist-packages/paste/script/command.py&quo=
t;, line 104,<br>
in run<br>
=A0 =A0 invoke(command, command_name, options, args[1:])<br>
=A0 File "/usr/lib/python2.7/dist-packages/paste/script/command.py&quo=
t;, line 143,<br>
in invoke<br>
=A0 =A0 exit_code =3D runner.run(args)<br>
=A0 File "/usr/lib/python2.7/dist-packages/paste/script/command.py&quo=
t;, line 238,<br>
in run<br>
=A0 =A0 result =3D self.command()<br>
=A0 File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 1=
24, in<br>
command<br>
=A0 =A0 self._load_config()<br>
=A0 File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 8=
6, in<br>
_load_config<br>
=A0 =A0 load_environment(conf.global_conf, conf.local_conf)<br>
=A0 File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py&qu=
ot;, line<br>
135, in load_environment<br>
=A0 =A0 p.load_all(config)<br>
=A0 File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", l=
ine 95, in<br>
load_all<br>
=A0 =A0 find_user_plugins(config)<br>
=A0 File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", l=
ine 178, in<br>
find_user_plugins<br>
=A0 =A0 plugins.extend(ep.load() for ep in entry_points)<br>
=A0 File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", l=
ine 178, in<br>
<genexpr><br>
=A0 =A0 plugins.extend(ep.load() for ep in entry_points)<br>
=A0 File "/usr/lib/python2.7/dist-packages/pkg_resources.py", lin=
e 1989, in<br>
load<br>
=A0 =A0 entry =3D __import__(self.module_name, globals(),globals(), ['_=
_name__'])<br>
=A0 File "/home/web/src/ckan/ckanext/textpreview/plugin.py", line=
5, in<br>
<module><br>
=A0 =A0 from ckan.common import json<br>
<div class=3D"im">ImportError: No module named common<br>
<br>
</div>Any other idea? Thanks,<br>
<br>
Edo<br>
<br>
---<br>
<br>
De: <a href=3D"mailto:ckan-dev-bounces at lists.okfn.org">ckan-dev-bounces at lis=
ts.okfn.org</a> [mailto:<a href=3D"mailto:ckan-dev-bounces at lists.okfn.org">=
ckan-dev-bounces at lists.okfn.org</a>]<br>
En nombre de Stefan Oderbolz<br>
Enviado el: martes, 27 de agosto de 2013 16:16<br>
Para: CKAN Development Discussions<br>
Asunto: Re: [ckan-dev] No module named common<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
Did you create and activate (i.e. source) your virtualenv with the followin=
g<br>
command?<br>
<br>
. /usr/lib/ckan/default/bin/activate<br>
<br>
your command prompt should change to something like "(default)$"<=
br>
<br>
On Tue, Aug 27, 2013 at 9:42 PM, Eduardo Bejar <<a href=3D"mailto:wonka@=
fundapi.org">wonka at fundapi.org</a>> wrote:<br>
Hello,<br>
<br>
Continuing installing CKAN 2.2 on an clean install Ubuntu 12.04 64-bit<br>
server. Following the Install from source guide<br>
(<a href=3D"http://docs.ckan.org/sv/latest/install-from-source.html" target=
=3D"_blank">http://docs.ckan.org/sv/latest/install-from-source.html</a>), n=
ow when I try<br>
step 6:<br>
<br>
paster db init -c /etc/ckan/default/development.ini<br>
<br>
I get:<br>
<br>
ImportError: No module named common<br>
<br>
Any ideas about what should I try? Previously this line gave me a<br>
json_preview error which I solved with your suggestions about changing it t=
o<br>
text_preview.<br>
<br>
Thank you for your comments,<br>
<br>
Edo<br>
<br>
<br>
<br>
_______________________________________________<br>
ckan-dev mailing list<br>
<a href=3D"mailto:ckan-dev at lists.okfn.org">ckan-dev at lists.okfn.org</a><br>
<a href=3D"http://lists.okfn.org/mailman/listinfo/ckan-dev" target=3D"_blan=
k">http://lists.okfn.org/mailman/listinfo/ckan-dev</a><br>
Unsubscribe: <a href=3D"http://lists.okfn.org/mailman/options/ckan-dev" tar=
get=3D"_blank">http://lists.okfn.org/mailman/options/ckan-dev</a><br>
<br>
<br>
<br>
<br>
--<br>
Liip AG =A0// =A0Feldstrasse 133 // =A0CH-8004 Zurich<br>
Tel <a href=3D"tel:%2B41%2043%20500%2039%2080" value=3D"+41435003980">+41 4=
3 500 39 80</a> // GnuPG 0x7B588C67 //=A0<a href=3D"http://www.liip.ch" tar=
get=3D"_blank">www.liip.ch</a><br>
<br>
<br>
<br>
_______________________________________________<br>
ckan-dev mailing list<br>
<a href=3D"mailto:ckan-dev at lists.okfn.org">ckan-dev at lists.okfn.org</a><br>
<a href=3D"http://lists.okfn.org/mailman/listinfo/ckan-dev" target=3D"_blan=
k">http://lists.okfn.org/mailman/listinfo/ckan-dev</a><br>
Unsubscribe: <a href=3D"http://lists.okfn.org/mailman/options/ckan-dev" tar=
get=3D"_blank">http://lists.okfn.org/mailman/options/ckan-dev</a><br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>=
Dave Caraway<div>Owner</div><div>Fog Mine<br><div><a href=3D"mailto:dave at fo=
gmine.com" target=3D"_blank">dave at fogmine.com</a></div><div>Cell: (937) 985=
-0867</div>
<div>Fax: (866) 238-3120</div></div>
</div>
--001a11c1c0ae3dc8ce04e50bffcc--
More information about the ckan-dev
mailing list