senaite / senaite.patient

Patient handling for SENAITE
GNU General Public License v2.0
10 stars 13 forks source link

Error when install with Senaite.Docker 2.1.0 #39

Closed heyjordn closed 2 years ago

heyjordn commented 2 years ago

Steps to reproduce

  1. Build a local image of senaite.docker 2.1.0 with cd senaite.docker/2.1.0 docker build -t senaite:2.1.0 .

  2. Run the image with the senaite.patient add-on specified

docker run --rm -p 8080:8080 -e ADDONS="senaite.patient" senaite:2.1.0

Current behavior

Build process errors out due to internal error.

Expected behavior

Running instance of senaite with the senaite.health

Screenshot (optional)

error: [Errno 2] No such file or directory: 'docs/changelog.rst'
An error occurred when trying to install /home/senaite/buildout-cache/downloads/dist/senaite.patient-1.0.0.zip. Look above this message for any errors that were output by easy_install.
While:
  Installing instance.
  Getting distribution for 'senaite.patient'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 2174, in main
    getattr(buildout, command)(args)
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 817, in install
    installed_files = self[part]._call(recipe.install)
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1603, in _call
    return f()
  File "/home/senaite/buildout-cache/eggs/cp27mu/plone.recipe.zope2instance-6.10.2-py2.7.egg/plone/recipe/zope2instance/recipe.py", line 155, in install
    installed.extend(self.install_scripts())
  File "/home/senaite/buildout-cache/eggs/cp27mu/plone.recipe.zope2instance-6.10.2-py2.7.egg/plone/recipe/zope2instance/recipe.py", line 949, in install_scripts
    requirements, ws = self.egg.working_set(["plone.recipe.zope2instance"])
  File "/home/senaite/buildout-cache/eggs/cp27mu/zc.recipe.egg-2.0.7-py2.7.egg/zc/recipe/egg/egg.py", line 87, in working_set
    allow_unknown_extras=bool_option(buildout_section, 'allow-unknown-extras')
  File "/home/senaite/buildout-cache/eggs/cp27mu/zc.recipe.egg-2.0.7-py2.7.egg/zc/recipe/egg/egg.py", line 168, in _working_set
    allow_unknown_extras=allow_unknown_extras)
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 957, in install
    return installer.install(specs, working_set)
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 682, in install
    for dist in self._get_dist(requirement, ws):
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 574, in _get_dist
    dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 1745, in _move_to_eggs_dir_and_compile
    [tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: need more than 0 values to unpack
ramonski commented 2 years ago

Please check again with the latest release 2.2.0

heyjordn commented 2 years ago

Hey @ramonski , thanks for all your help but I get the same error in senaite 2.2.0. Any ideas as to why this would happening?

ramonski commented 2 years ago

Do you get senaite.patient 1.1.0?

heyjordn commented 2 years ago

Just tried senaite.patient:1.1.0 and got the same output

hile:
  Installing instance.
  Getting distribution for 'senaite.patient==1.1.0'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 2174, in main
    getattr(buildout, command)(args)
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 817, in install
    installed_files = self[part]._call(recipe.install)
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1603, in _call
    return f()
  File "/home/senaite/buildout-cache/eggs/cp27mu/plone.recipe.zope2instance-6.10.2-py2.7.egg/plone/recipe/zope2instance/recipe.py", line 155, in install
    installed.extend(self.install_scripts())
  File "/home/senaite/buildout-cache/eggs/cp27mu/plone.recipe.zope2instance-6.10.2-py2.7.egg/plone/recipe/zope2instance/recipe.py", line 949, in install_scripts
    requirements, ws = self.egg.working_set(["plone.recipe.zope2instance"])
  File "/home/senaite/buildout-cache/eggs/cp27mu/zc.recipe.egg-2.0.7-py2.7.egg/zc/recipe/egg/egg.py", line 87, in working_set
    allow_unknown_extras=bool_option(buildout_section, 'allow-unknown-extras')
  File "/home/senaite/buildout-cache/eggs/cp27mu/zc.recipe.egg-2.0.7-py2.7.egg/zc/recipe/egg/egg.py", line 168, in _working_set
    allow_unknown_extras=allow_unknown_extras)
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 957, in install
    return installer.install(specs, working_set)
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 682, in install
    for dist in self._get_dist(requirement, ws):
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 574, in _get_dist
    dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
  File "/usr/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 1745, in _move_to_eggs_dir_and_compile
    [tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: need more than 0 values to unpack
ramonski commented 2 years ago

Ok, think we got an issue in our release package. We'll need to do do a re-release. Thanks for reporting

khanhudanurul commented 2 years ago

@ramonski Same error occurred while installing senaite.patient 1.0.0 and it persists in senaite.patient 1.1.0 while installing using docker image, and as far as I remember the problem occurred while installing senaite.patient using github repository as well. Hope you find the solution soon. All the best.

ramonski commented 2 years ago

Just released 1.2.0. Please retry with with the latest Docker Image or SENAITE >= 2.2.0

ramonski commented 2 years ago

Correction: It should work in SENAITE >= 2.2.0 but not yet in Docker. We'll need to do a re-upload of the v2.2.0 image to hub.docker.com as well.

ramonski commented 2 years ago

Ok, finally we got it.

Please make sure you pull the latest senaite/senaite:v2.2.0 image with the following digest:

$ docker pull senaite/senaite:v2.2.0
v2.2.0: Pulling from senaite/senaite
Digest: sha256:67a5afb20e95eaf39a50a10bfcab070b118ca23f964c067719939443da27bf63
Status: Image is up to date for senaite/senaite:v2.2.0
docker.io/senaite/senaite:v2.2.0

Then run the following command:

$ docker run --rm -p 8080:8080 -e ADDONS="senaite.patient" senaite/senaite:v2.2.0

Finally install senaite.patient over the Add-ons control panel: http://localhost:8080/senaite/prefs_install_products_form

khanhudanurul commented 2 years ago

Thanks @ramonski Works like a charm, kudos.