Jump to content

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? 

  • 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.

  • 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

     

  • 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]:

  • Link to post
    Share on other sites

    Posted · extension modification from 3.2 to 3.4

    last versione works and works fine also in 3.4. thanks for hints

    BedlevelPlugin ok .zip

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.8 beta released
        Another Cura release has arrived and in this 5.8 beta release, the focus is on improving Z seams, as well as completing support for the full Method series of printers by introducing a profile for the UltiMaker Method.
          • Like
        • 1 reply
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...