Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in installing #11

Closed
jpisongithub opened this issue May 28, 2020 · 5 comments
Closed

Bug in installing #11

jpisongithub opened this issue May 28, 2020 · 5 comments

Comments

@jpisongithub
Copy link

When trying to install on OctoPi Version 1.3.6 running on raspi0 I get the following...

Installing plugin "OctoPrint-Webhooks" from https://github.com/2blane/OctoPrint-Webhooks/archive/master.zip.../home/pi/oprint/bin/python2 -m pip install https://github.com/2blane/OctoPrint-Webhooks/archive/master.zipCollecting https://github.com/2blane/OctoPrint-Webhooks/archive/master.zipDownloading https://github.com/2blane/OctoPrint-Webhooks/archive/master.zipRequirement already satisfied: OctoPrint in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint-Webhooks==3.0.3)Requirement already satisfied: requests in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint-Webhooks==3.0.3)Collecting pillow (from OctoPrint-Webhooks==3.0.3)Downloading https://files.pythonhosted.org/packages/b3/d0/a20d8440b71adfbf133452d4f6e0fe80de2df7c2578c9b498fb812083383/Pillow-6.2.2.tar.gz (37.8MB)Exception:Traceback (most recent call last):File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in mainstatus = self.run(options, args)File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/commands/install.py", line 335, in runwb.build(autobuilding=True)File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/wheel.py", line 749, in buildself.requirement_set.prepare_files(self.finder)File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_filesignore_dependencies=self.ignore_dependencies))File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/req/req_set.py", line 620, in _prepare_filesession=self.session, hashes=hashes)File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 821, in unpack_urlhashes=hashesFile "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 659, in unpack_http_urlhashes)File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 882, in _download_http_url_download_url(resp, link, content_file, hashes)File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 603, in _download_urlhashes.check_against_chunks(downloaded_chunks)File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/utils/hashes.py", line 46, in check_against_chunksfor chunk in chunks:File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 571, in written_chunksfor chunk in chunks:File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/utils/ui.py", line 139, in iterfor x in it:File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/download.py", line 560, in resp_readdecode_content=False):File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 436, in streamdata = self.read(amt=amt, decode_content=decode_content)File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 384, in readdata = self._fp.read(amt)File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 63, in readself._close()File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 50, in _closeself.__callback(self.__buf.getvalue())File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py", line 275, in cache_responseself.serializer.dumps(request, response, body=body),File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 86, in dumpsdata, separators=(",", ":"), sort_keys=True,File "/usr/lib/python2.7/json/init.py", line 251, in dumpssort_keys=sort_keys, **kw).encode(obj)File "/usr/lib/python2.7/json/encoder.py", line 210, in encodereturn ''.join(chunks)MemoryError

@2blane
Copy link
Owner

2blane commented May 28, 2020

Hmm, if you look at the very last word there is a 'MemoryError'. Seems your Raspberry Pi 0 ran out of memory trying to install 'Pillow' which is a package needed by the plugin. Seems to be an issue on smaller devices. Will look into if there is a workaround

@2blane
Copy link
Owner

2blane commented May 28, 2020

@jpisongithub
Looks like it's a common issue. See these links for more guidance. It looks a little involved to fix, but basically, the Pi 0 doesn't have a ton of memory so it only allows a certain amount to things like temporary downloads (which is used by PIP to install the plugin and its dependencies). My plugin isn't the only one you'll run into issues with.

General Octoprint Issue

Installing another plugin with issues

@2blane 2blane closed this as completed May 28, 2020
@jpisongithub
Copy link
Author

Interesting, just found this... python-pillow/Pillow#4555 will try ssh into the pi then running "sudo pip install --no-cache-dir Pillow" and report back

@jpisongithub
Copy link
Author

jpisongithub commented May 28, 2020

pip install command via SSH doesn't work due to another documented blunder

workaround follows using the octopi web interface...

went into settings and then to plugin manager
click the wrench in the upper right hand corner
scroll all the way down to the bottom

for additional arguments enter: --no-cache-dir
and check: Force the user of the --user flag with pop install

then install webhooks

then reboot the pi when prompted

works 👍 thanks for pointing me in the right direction!

@2blane
Copy link
Owner

2blane commented May 28, 2020

@jpisongithub great to hear! Glad you got it working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants