Jump to content
Tmirante

extension modification from 3.2 to 3.4

Recommended Posts

Posted · extension modification from 3.2 to 3.4

good morning. 

i did an important extension for my prusa i3 printer in cura to have a complete set of commands to tune bed level. after upgrading from 3.2 to 3.3 and 3.4 the extension not works. i was able to identify the changings causing the error. 

def _getPrinterOutputDevices(self) -> List[PrinterOutputDevice]:
    return [printer_output_device for printer_output_device in Application.getInstance().getOutputDeviceManager().getOutputDevices() if isinstance(printer_output_device, PrinterOutputDevice)]

in def on old 3.2 cura there was not the  -> List[PrinterOutputDevice]. if i insert it the extension is not loaded at all , if i delete  the extension is loaded. 

what is the meaning ? is it required about you? 

Share this post


Link to post
Share on other sites
Posted · extension modification from 3.2 to 3.4

Without the rest of the code or an understanding of what your plugin does, there is no way we can tell you if that code is required.

Share this post


Link to post
Share on other sites
Posted · extension modification from 3.2 to 3.4

I have too much going on to go hunt for your code in other topics, sorry.

 

Please have a look at cura.log in your configuration folder. It will tell you if there's a (Pyhton-)error in your code. The file is probably fairly large. You can delete it and Cura will create a new one. Then start Cura and the log will tell you what is going wrong.

 

Specifically the bit "   -> List[PrinterOutputDevice]  " is called "type hinting"; it tells Python what sort of data to expect. It is optional (but recommended). It could be that Python is having an issue understanding what "PrinterOutputDevice" is; are you importing it?

from cura.PrinterOutputDevice import PrinterOutputDevice

 

Share this post


Link to post
Share on other sites
Posted · extension modification from 3.2 to 3.4

yes of course is standard in pluging import statements i have 

from cura.PrinterOutputDevice import PrinterOutputDevice

 the log says that

2018-08-02 12:44:57,266 - ERROR - [MainThread] UM.Qt.Bindings.PluginsModel._update [61]: BedlevelPlugin is missing a plugin metadata entry

2018-08-02 12:44:57,347 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [301]: file:///C:/Program Files/Ultimaker Cura 3.4/resources/qml/Topbar.qml:19: TypeError: Cannot read property 'stageId' of null

2018-08-02 12:44:57,348 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [301]: file:///C:/Program Files/Ultimaker Cura 3.4/resources/qml/Topbar.qml:104: TypeError: Cannot read property 'stageId' of null

2018-08-02 12:44:57,349 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [301]: file:///C:/Program Files/Ultimaker Cura 3.4/resources/qml/Topbar.qml:175: TypeError: Cannot read property 'stageId' of null

2018-08-02 12:44:57,350 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [301]: file:///C:/Program Files/Ultimaker Cura 3.4/resources/qml/Cura.qml:433: TypeError: Cannot read property 'mainComponent' of null

2018-08-02 12:44:57,352 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [301]: file:///C:/Program Files/Ultimaker Cura 3.4/resources/qml/Cura.qml:427: TypeError: Cannot read property 'mainComponent' of null

2018-08-02 12:44:57,353 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [301]: file:///C:/Program Files/Ultimaker Cura 3.4/resources/qml/Cura.qml:465: TypeError: Cannot read property 'sidebarComponent' of null

2018-08-02 12:44:57,354 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [301]: file:///C:/Program Files/Ultimaker Cura 3.4/resources/qml/Cura.qml:497: TypeError: Cannot read property 'sidebarComponent' of null

 

this error disappear if i eliminate -> List[PrinterOutputDevice]:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Our picks

    • Ultimaker Cura 4.0 | Stable available!
      Ultimaker Cura 4.0 is mainly focused on the improved user interface and cloud integration.
      As always, we want to collect your user feedback for this release. If there are any improvements you can think of, feel free to mention it here and help us to shape the next release.
      • 98 replies
×
×
  • Create New...

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!