-
Notifications
You must be signed in to change notification settings - Fork 23
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
Upgrade from 1.6.0 to 1.6.2 fails #10
Comments
same here. |
Yep. Can confirm. |
I also confirm this bug |
Same here... not sure it's related but sounds like it may be: I noted that "psycopg2-binary" is already in the plugin_requires section. So it's not that. |
Well, good to know it's nothing on my end causing this. |
This is probably going to help the rest of you guys, but I did resolve my issue with a failed upgrade to 1.6.2. I resolved the issue through the back door. I am running three instances of Octoprint. Two are connected to printers, the third is just a database server for filament manager. The filament manager instance and one of the printer instances are new, having been built up over the last 10 days in my fight to get filament manager to run under Python3. Both of those instances successfully upgraded to 1.6.2. I just cloned the working printer instance, and reconfigured it, and now all three instances of Octoprint are connecting to the filament manager database. Thanks, Kevin |
Same problem here 👍 |
OK, this worked for me on Octopi - I'm in the middle of a very long print job so will not be able to try the actual upgrade anytime soon (about 16 hours to go):
Now we'll fix the missing pg_config: And now the pip install will work: There will be some warnings about upgrading pip and the upcoming deprecation of Python 2.7 but I believe this will solve the problem. I will not be able to verify for some hours. |
I was successfully able to update. I don't know if the pip install was needed but the essential step was sudo apt-get install libpq-dev |
Can confirm @hgroover solution worked. |
Thanks, updated the issue. Good to know the pip command wasn't also needed. |
Ok so I don't know how to do all those commands but mine still is not updating through the update manager |
@12345Josparky that's just a workaround for those who have ssh / sudo access (not that hard but there are a few steps you might have to go through, like setting up putty or some other ssh client, and knowing the password used to setup your installation of Octopi, assuming that's what you're using; but if you're not already experienced at this it's better to wait for an update). The maintainers of this addon will probably come out with an update soon that will address this. I'm just a user who is grateful to have this very useful addon and has provided detailed info on what happened and what fixes it. My best suggestion is to wait, seeing that the maintainers here are pretty active they will have an update before long. In the meantime the previous version should work perfectly well. I hope that helps! |
Thanks for the quick reply I do have putty but I am not that familiar with it at all lol. I watched a video that showed me how to set it all up and that was couple years ago. I don't even remember how I done it lol. I can wait no biggy. Thanks for your help and reply. |
I also confirm it works with the manual update |
Same problem here. Can we just not worry about manually updating and wait until a future update fixes this so it can auto-update via Octoprint by itself smoothly? |
Sure but I wouldn't hold your breath. The problem appears to be in pip not in this plugin. Outdated versions of pip fail to install the dependency. You will likely need to wait for Octopi itself to receive an update. |
If you want to keep receiving the update notification, sure.
|
Is it just that one command? I see.5 other steps in hgroover's reply earlier, and I'm worried about one of those failing also. Should I try just the one command you wrote, Deses, or all 6 of hgroover's commands? |
No, you just need the two, sudo apt update and sudo apt install. I revised
the original ticket.
None of those additional steps will hurt but you definitely don't need
them. I was just showing my process. As it turns out many people have
already confirmed you just need the two commands.
The point about this being a pip issue due to using the deprecated Python
2.7 (rather than Python 3) is interesting. This workaround may have broader
use than just for this plugin.
…On Sun, Oct 11, 2020, 8:46 PM Max Mednik ***@***.***> wrote:
Is it just that one command? I see.5 other steps in hgroover's reply
earlier, and I'm worried about one of those failing also. Should I try just
the one command you wrote, Deses, or all 6 of hgroover's commands?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKQJHJT2C5EFIYSFA76KWTSKJNYNANCNFSM4SKABJDA>
.
|
so where do you put the commands can they be put in octoprint?? |
download and install PuTTY. https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html. use the ip address of your octoprint instance to telnet direct to it witH PuTTY. log in with the username and password you used to create your octoprint instance, then enter the commands listed. |
Thanks for posting the fix, |
@12345Josparky if you have a keyboard and a TV it may be easier to simply plug the Raspberry Pi into those, login on the console and then type those commands. If you've not used SSH before this may be easier. Otherwise download putty. And you should be all done. I can't remember if the default octopi image has ssh enabled though or if I took additional steps to make this work for me. But as said above the same stuff works by logging directly into the console, all you need is a keyboard and a hdmi cable. |
Thank you all for the detailed instructions. I do have one more question. May be a dumb one lol. I am assuming I need to download the update from here and have it somewhere so it can install it. I appreciate all you guys help. I do have putty installed on my pc just not familiar with it. I watched a video to get it all installed before. |
Not a dumb question by any means. After doing the apt update / apt install (assuming it completes successfully) just go back to Octoprint / settings / updates and click on the update button for Filament Manager. This time it should succeed. |
The instructions worked and I am now update. So if I can ask one more question so I understand this a little more for future. What is this updating exactly? And thank you all for being so nice to help the ones that don't know that much about putty. I am always wanting to learn more. |
There are a few layers to what you probably have:
The apt update you ran is part of the operating system support. apt is a package manager and allows you to add and update features of a Linux-based operating system distribution. pip is kind of a package manager for Python libraries. Someone mentioned in an earlier comment that this problem is actually related to pip. Installing this missing library at the OS level works around this problem with pip, which in turn causes the update for this plugin to fail. |
Thanks hgroover |
Yeah @12345Josparky to answer your question specifically on what this did: When the update runs you can see above the error message says So what we did with the commands: With the missing software installed, pip is able to download and install psycopg2 and then install this plugin. |
Hi all, I thought it is just an other dependency which I could add to the requirement section in the plugin. Now, I removed the driver from the plugin (Version 1.6.3), If someone needs to use the external database, he/she can look into the wiki-page: https://github.com/OllisGit/OctoPrint-FilamentManager/wiki/Setup-PostgreSQL-on-Raspbian-(Stretch) |
@OllisGit it should have been. Maybe something to do with python version being outdated. At least on the psycopg github page there are people saying an updated version of pip fixes the problem, and frankly it should since the whole point of the binary package is that it shouldn't need to be built. psycopg/psycopg2#699 |
@OllisGit I can confirm that the upgrade from 1.6.0 to 1.6.3 went smoothly on another Octopi installation (where I had not applied the apt workaround). Can we close this issue now? If you'd rather I do so please let me know... Thank you! |
This issue has been automatically marked for closing, because it has not had activity in 30 days. It will be closed if no further activity occurs in 10 days. |
Describe the bug
I am running Octoprint 1.4.2 via Octopi (installed recently). When trying to update to 1.6.2, I get this error:
Updating, please wait.
/home/pi/oprint/bin/python2 -m pip --disable-pip-version-check install https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/master.zip --no-cache-dir
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/master.zip
Downloading https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/master.zip (245kB)
Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint-FilamentManager==1.6.2) (1.4.2)
Requirement already satisfied: backports.csv<1.1,>=1.0.5 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint-FilamentManager==1.6.2) (1.0.7)
Requirement already satisfied: uritools<2.2,>=2.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint-FilamentManager==1.6.2) (2.1.1)
Requirement already satisfied: SQLAlchemy<1.2,>=1.1.15 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint-FilamentManager==1.6.2) (1.1.18)
Collecting psycopg2-binary
Downloading https://files.pythonhosted.org/packages/fc/51/0f2c6aec5c59e5640f507b59567f63b9d73a9317898810b4db311da32dfc/psycopg2-binary-2.8.6.tar.gz (384kB)
ERROR: Command errored out with exit status 1:
command: /home/pi/oprint/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jVjlgA/psycopg2-binary/setup.py'"'"'; file='"'"'/tmp/pip-install-jVjlgA/psycopg2-binary/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-jVjlgA/psycopg2-binary/pip-egg-info
cwd: /tmp/pip-install-jVjlgA/psycopg2-binary/
Complete output (23 lines):
running egg_info
creating /tmp/pip-install-jVjlgA/psycopg2-binary/pip-egg-info/psycopg2_binary.egg-info
writing /tmp/pip-install-jVjlgA/psycopg2-binary/pip-egg-info/psycopg2_binary.egg-info/PKG-INFO
writing top-level names to /tmp/pip-install-jVjlgA/psycopg2-binary/pip-egg-info/psycopg2_binary.egg-info/top_level.txt
writing dependency_links to /tmp/pip-install-jVjlgA/psycopg2-binary/pip-egg-info/psycopg2_binary.egg-info/dependency_links.txt
writing manifest file '/tmp/pip-install-jVjlgA/psycopg2-binary/pip-egg-info/psycopg2_binary.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
https://www.psycopg.org/docs/install.html).
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The update did not finish successfully. Please consult
octoprint.log
andplugin_softwareupdate_console.log
for details.(from octoprint.log)
2020-10-09 12:59:15,760 - octoprint.plugins.softwareupdate - INFO - Starting update of filamentmanager to 1.6.2...
2020-10-09 12:59:22,073 - octoprint.plugins.softwareupdate - ERROR - Update of filamentmanager can not be performed, please also check plugin_softwareupdate_console.log for possible causes of this
Traceback (most recent call last):
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/softwareupdate/init.py", line 1155, in _perform_update
update_result = updater.perform_update(target, populated_check, target_version, log_cb=self._log, online=online)
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/softwareupdate/updaters/pip.py", line 116, in perform_update
raise exceptions.UpdateError("Error while executing pip install", (stdout, stderr))
UpdateError
2020-10-09 12:59:22,689 - octoprint.plugins.tracking - INFO - Sent tracking event update_failed, payload: {'to_version': '1.6.2', 'from_version': '1.6.0', 'target': u'filamentmanager'}
Steps to reproduce
NOTE There appears to be a workaround for this. On Raspbian (Octopi) or other Debian / Ubuntu systems, run
sudo apt-get update
sudo apt-get install libpq-dev
This installs pg_config from the PostgreSQL dev tools.
Expected behavior
Update should succeed.
Did the same happen when all other 3rd party plugins are disabled?
Did not try this.
Log file
octoprint.log
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: