[ckan-dev] Could you help me check pycharm configuration for CKAN? I can't run CKAN project in pycharm IDE, Thank you very much!

bupt bupt buptloveandroid at gmail.com
Thu Mar 7 13:52:49 UTC 2013


hello everyone,
I'v already installed CKAN by Option2 "install from source"(
http://docs.ckan.org/en/ckan-1.8/install-from-source.html) , my CKAN
virtualenvironment is setting at "/home/ys/ysvirenv/", and I start CKAN in
ubuntu terminal , the output information is printed as followed:
       "
(ysvirenv)ys at ys-laptop:~/ysvirenv/src/ckan$ /home/ys/ysvirenv/bin/paster
serve --reload development.ini
Starting subprocess with file monitor
/home/ys/ysvirenv/src/ckan/ckan/lib/app_globals.py:136: DeprecationWarning:
The attribute 'config.debug' has moved to the pylons.config dictionary:
Please access it via pylons.config['debug']
 set_main_css(main_css)
Starting server in PID 6184.
serving on 0.0.0.0:5000 view at http://127.0.0.1:5000
"

Now I can visit CKAN in my browser.
But after I import CKAN project into pycharm IDE and configure it
correctly, when I start CKAN project, some error output information appears
in the console as followed:
"
/home/ys/ysvirenv/bin/python2.6 /home/ys/ysvirenv/bin/paster serve --reload
development.ini
Starting subprocess with file monitor
Traceback (most recent call last):
  File "/home/ys/ysvirenv/bin/paster", line 8, in <module>
    load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
  File
"/home/ys/ysvirenv/lib/python2.6/site-packages/paste/script/command.py",
line 104, in run
    invoke(command, command_name, options, args[1:])
  File
"/home/ys/ysvirenv/lib/python2.6/site-packages/paste/script/command.py",
line 143, in invoke
    exit_code = runner.run(args)
  File
"/home/ys/ysvirenv/lib/python2.6/site-packages/paste/script/command.py",
line 238, in run
    result = self.command()
  File
"/home/ys/ysvirenv/lib/python2.6/site-packages/paste/script/serve.py", line
284, in command
    relative_to=base, global_conf=vars)
  File
"/home/ys/ysvirenv/lib/python2.6/site-packages/paste/script/serve.py", line
321, in loadapp
    **kw)
  File
"/home/ys/ysvirenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File
"/home/ys/ysvirenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
line 272, in loadobj
    return context.create()
  File
"/home/ys/ysvirenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
line 710, in create
    return self.object_type.invoke(self)
  File
"/home/ys/ysvirenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
line 146, in invoke
    return fix_call(context.object, context.global_conf,
**context.local_conf)
  File
"/home/ys/ysvirenv/lib/python2.6/site-packages/paste/deploy/util.py", line
56, in fix_call
    val = callable(*args, **kw)
  File "/home/ys/ysvirenv/src/ckan/ckan/config/middleware.py", line 54, in
make_app
    load_environment(conf, app_conf)
  File "/home/ys/ysvirenv/src/ckan/ckan/config/environment.py", line 173,
in load_environment
    search.check_solr_schema_version()
  File "/home/ys/ysvirenv/src/ckan/ckan/lib/search/__init__.py", line 285,
in check_solr_schema_version
    res = urllib2.urlopen(req)
  File "/usr/lib64/python2.6/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib64/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
    '_open', req)
  File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.6/urllib2.py", line 1172, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib64/python2.6/urllib2.py", line 1147, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno -2] Name or service not known>

Process finished with exit code 0
"

I can't start CKAN in pycharm. My CKAN's pycharm run configuration is as
followed:
"
scripted:  /home/ys/ysvirenv/bin/paster
script parameters:  serve --reload development.ini
python interpreter:  Python 2.6.5 virtualenv at /home/ys/ysvirenv
working directory:  /home/ys/ysvirenv/src/ckan
"

Could you help me figure out where is my problem? Is there something wrong
with pycharm configuration for pylons running? How can I change pycharm IDE
configuration to run CKAN correctly?
I'v tried many ways to solve this problem. This problem already obstructed
me for several days and I almost despaired.

Please help me!
Thank you very much!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130307/0f8ccb26/attachment.html>


More information about the ckan-dev mailing list