markwal / cura-octoprintupload Goto Github PK
View Code? Open in Web Editor NEWPlugin for Cura that adds a "Save to OctoPrint" command
License: GNU Affero General Public License v3.0
Plugin for Cura that adds a "Save to OctoPrint" command
License: GNU Affero General Public License v3.0
Hi Mark,
looks like they changed again something in the upcoming 3.3.0 version :-(((
Hope this are the important lines from the logfile:
2018-04-09 16:57:45,524 - ERROR - [MainThread] UM.Logger.logException [81]: Exception: Unable to write to file overhangtest3d: 'BuildPlateModel' object has no attribute 'activeBuildPlate'
2018-04-09 16:57:45,527 - ERROR - [MainThread] UM.Logger.logException [85]: Traceback (most recent call last):
2018-04-09 16:57:45,529 - ERROR - [MainThread] UM.Logger.logException [85]: File "/build/3.3/build/inst/lib/python3.5/site-packages/UM/Qt/Bindings/OutputDeviceManagerProxy.py", line 122, in _writeToDevice
2018-04-09 16:57:45,531 - ERROR - [MainThread] UM.Logger.logException [85]: File "/home/bernd/.local/share/cura/3.3/plugins/Cura-OctoPrintUpload/OctoPrintOutputDevice.py", line 72, in requestWrite
2018-04-09 16:57:45,535 - ERROR - [MainThread] UM.Logger.logException [85]: active_build_plate_id = Application.getInstance().getBuildPlateModel().activeBuildPlate
2018-04-09 16:57:45,537 - ERROR - [MainThread] UM.Logger.logException [85]: AttributeError: 'BuildPlateModel' object has no attribute 'activeBuildPlate'
If I can provide further information: let me know.
Hi, i am running Repetier-Server for 4 printers. I normaly use S3D but sometimes i like to use cura. But there seems to be no plugin to do it. So i downloaded your plugin and had a look at the code (I have no idea about phyton) and got it somehow working. There were 2 lines i changed and maybe u could tell me if i actually got it the right way or if i should change something else. Maybe this could help some other guys with Repetier-Server but i want to make sure i am not doing some weird stuff here.
formvalues = {'select': 'false', 'print': 'false'}
changed to
formvalues = {'a': 'upload'}
self._request = QtNetwork.QNetworkRequest(QUrl(self._host + "/api/files/local"))
changed to
self._request = QtNetwork.QNetworkRequest(QUrl(self._host))
Now i just added http://THE.IP.0.0:3344/printer/model/PRINTERNAME as server and added the api-key for repetier and it worked.
after unpacking this plugin i get:
WARNING - [MainThread] UM.PluginRegistry.loadPlugin [374]: Plugin [Cura-OctoPrintUpload] with supported sdk versions [['5.0.0']] is incompatible with the current sdk version [7.0.0].
If I choose Extensions->Octoprint->Octoprint servers nothing happens and following lines appear in log file:
2016-12-08 00:43:46,192 - CRITICAL - .../cura/CrashHandler.py (show [24]): Traceback (most recent call last):
2016-12-08 00:43:46,193 - CRITICAL - .../cura/CrashHandler.py (show [24]): File "/opt/cura/lib/python3/dist-packages/UM/Qt/Bindings/ExtensionModel.py", line 47, in subMenuTriggered
2016-12-08 00:43:46,194 - CRITICAL - .../cura/CrashHandler.py (show [24]): item["extension"].activateMenuItem(option_name)
2016-12-08 00:43:46,195 - CRITICAL - .../cura/CrashHandler.py (show [24]): File "/opt/cura/lib/python3/dist-packages/UM/Extension.py", line 36, in activateMenuItem
2016-12-08 00:43:46,195 - CRITICAL - .../cura/CrashHandler.py (show [24]): self._menu_function_dict[name]()
2016-12-08 00:43:46,196 - CRITICAL - .../cura/CrashHandler.py (show [24]): File "/home/rm/.local/share/cura/plugins/Cura-OctoPrintUpload/OctoPrintPlugin.py", line 61, in showSettingsDialog
2016-12-08 00:43:46,197 - CRITICAL - .../cura/CrashHandler.py (show [24]): self._showDialog("OctoPrintPlugin.qml")
2016-12-08 00:43:46,198 - CRITICAL - .../cura/CrashHandler.py (show [24]): File "/home/rm/.local/share/cura/plugins/Cura-OctoPrintUpload/OctoPrintPlugin.py", line 57, in _showDialog
2016-12-08 00:43:46,199 - CRITICAL - .../cura/CrashHandler.py (show [24]): self._dialogs[qml] = self._createDialog(qml)
2016-12-08 00:43:46,200 - CRITICAL - .../cura/CrashHandler.py (show [24]): File "/home/rm/.local/share/cura/plugins/Cura-OctoPrintUpload/OctoPrintPlugin.py", line 44, in _createDialog
2016-12-08 00:43:46,200 - CRITICAL - .../cura/CrashHandler.py (show [24]): path = QUrl.fromLocalFile(os.path.join(PluginRegistry.getInstance().getPluginPath("OctoPrintOutputDevice"), qml))
2016-12-08 00:43:46,201 - CRITICAL - .../cura/CrashHandler.py (show [24]): File "/usr/local/lib/python3.4/posixpath.py", line 82, in join
2016-12-08 00:43:46,201 - CRITICAL - .../cura/CrashHandler.py (show [24]): path += b
2016-12-08 00:43:46,202 - CRITICAL - .../cura/CrashHandler.py (show [24]): TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
Please, don't give up working on this plugin! It would be great to be able to send prints to octoprint!
Hi Mark,
first, I'm happy to see that you still work on that plugin.
It's exactly the plugin for my workflow (I used for long time with Cura 14.xx):
Slicing with cura - sending to one of my octoprint(ers). Nothing more, nothing less ;-))
The Cura's octoprint-plugin is much too much. I don't like to monitor the print via Cura and so on...
But now to the problem:
Your plugin works so far with Cura 2.3.1 (under Ubuntu) - I can configure my printers and the entries in the save select appear "save to octo..." - 'til the moment I want to send a file. the following error occurrs:
2016-11-07 21:28:21,535 - ERROR - .../UM/Logger.py (logException [53]): Exception: Job <UM.Mesh.WriteMeshJob.WriteMeshJob object at 0x7f47dbd182b0> caused an exception
2016-11-07 21:28:21,587 - ERROR - .../UM/Logger.py (logException [53]): Traceback (most recent call last):
2016-11-07 21:28:21,588 - ERROR - .../UM/Logger.py (logException [53]): File "/usr/lib/python3/dist-packages/UM/JobQueue.py", line 122, in run
2016-11-07 21:28:21,588 - ERROR - .../UM/Logger.py (logException [53]): job.run()
2016-11-07 21:28:21,591 - ERROR - .../UM/Logger.py (logException [53]): File "/usr/lib/python3/dist-packages/UM/Mesh/WriteMeshJob.py", line 37, in run
2016-11-07 21:28:21,592 - ERROR - .../UM/Logger.py (logException [53]): self.setResult(self._writer.write(self._stream, self._nodes, self._mode))
2016-11-07 21:28:21,593 - ERROR - .../UM/Logger.py (logException [53]): File "/usr/lib/cura/plugins/GCodeWriter/GCodeWriter.py", line 59, in write
2016-11-07 21:28:21,594 - ERROR - .../UM/Logger.py (logException [53]): stream.write(gcode)
2016-11-07 21:28:21,595 - ERROR - .../UM/Logger.py (logException [53]): TypeError: write(self, Union[QByteArray, bytes, bytearray]): argument 1 has unexpected type 'str'
Unfortunately I'm not a Python programmer but I would very much appreciate if you would be able to fix this issue. Can I provide further information?
Best regards Bernd
cura 2.5
raspberry pi zero w
octoprint 0.14 latest
wanhao duplicator i3
could not save to octoprint: error tranferring http://192.168.1.165/api/files/local - server replied:INTERNAL SERVER ERROR
Can this be made to work with Cura 2.4?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.