Bin/instance fg gives error- 'ImportError: no module named requests'

I am trying to install the development version of ploneorg.addonlisting package from https://github.com/plone/ploneorg.addonlisting

  • I have installed a local plone 5 for development using the unified UNIX installer
  • In the Plone/zinstance directory, I edited the buildout.cfg and develop.cfg to add ploneorg.addonlisting under eggs,auto-checkout and [sources]. Following link has the content of builldout.cfg
    https://paste.ee/p/t4ca5
  • Running bin/buildout from zinstance directory gives no error, but when I run bin/instance fg after that, I get the error pasted in the following link
    https://paste.ee/p/rLYen
    (but requests module has already been installed using pip)
    Am I missing something?

Looks like the dependency is missing in setup.py of the addon in install_requires list here https://github.com/plone/ploneorg.addonlisting/blob/master/setup.py
Try adding it and rerun buildout.
Hth

As suggested, I added 'requests' under the install_requires list of setup.py.
when I ran bin/buildout again there was no error,but bin/instance fg gaveImportError:no module named simplejson . So I added 'simplejson' under install_requires list of setup.py.
when I ran bin/buildout again there was no error,but bin/instance fg gives a new error pasted here https://paste.ee/p/zShNX.
What might be wrong?

Yeah, I'm getting the same error you are, with Plone 5.0.6.

In October when we were sprinting on this I did not run into this error. @Alexander_Loechel any ideas?

https://plone.org is actually running a pre-release version of Plone: 5.1a1

Maybe @pavithirakc you should try using Plone 5.1b2

I suspect that because setup.py shows just the Plone 5.1 classifier: https://github.com/plone/ploneorg.addonlisting/blob/master/setup.py#L24

The coredev buildout is the way I've gotten the latest Plone: https://docs.plone.org/develop/coredev/docs/intro.html though where it says

git clone -b 5.0 https://github.com/plone/buildout.coredev ./plone5devel

try

git clone -b 5.1 https://github.com/plone/buildout.coredev ./plone5devel

Filed issues

Thanks for the response .
I'll try running it with plone 5.1 as suggested.

FYI: simplejson is no longer needed. json is part of Python standard library. You can replace all occurrences of simplejson with just json. Then you do not need to add it to your install_requires any more.

I have no good idea why the other error occurs, sorry.

I am following "Setting up Your Development Environment" instructions from https://docs.plone.org/develop/coredev/docs/intro.html. when I run ../plone5devpy/bin/buildout bootstrap , I get the following error

Traceback (most recent call last):
  File "/home/pavithra/buildouts/plone5devpy/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1996, in main
    user_defaults, command, args)
  File "/home/pavithra/buildouts/plone5devpy/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 228, in __init__
    data['buildout'].copy(), override, set()))
  File "/home/pavithra/buildouts/plone5devpy/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1631, in _open
    downloaded)
  File "/home/pavithra/buildouts/plone5devpy/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1634, in _open
    downloaded))
  File "/home/pavithra/buildouts/plone5devpy/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1631, in _open
    downloaded)
  File "/home/pavithra/buildouts/plone5devpy/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1578, in _open
    downloaded_filename, is_temp = download(filename)
  File "/home/pavithra/buildouts/plone5devpy/local/lib/python2.7/site-packages/zc/buildout/download.py", line 128, in __call__
    local_path, is_temp = self.download(url, md5sum, path)
  File "/home/pavithra/buildouts/plone5devpy/local/lib/python2.7/site-packages/zc/buildout/download.py", line 207, in download
    tmp_path, headers = urlretrieve(url, tmp_path)
  File "/home/pavithra/buildouts/plone5devpy/local/lib/python2.7/site-packages/zc/buildout/download.py", line 52, in urlretrieve
    url_obj = urllib2.urlopen(req)
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1214, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1187, in do_open
    r = h.getresponse(buffering=True)
  File "/usr/lib/python2.7/httplib.py", line 1089, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 444, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 408, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''

I think you're going to have to wait for an answer from @Alexander_Loechel @loechel

@pavithirakc @tkimnguyen sorry, I have fixed both problems, now ploneorg.addonlisting also runs on a fresh install of Plone 5.0.7 or any buildout.coredev.

1 Like