-
Hello since today's update of the macro's i get this error message on start of print of gcode which worked fine yesterday. Error evaluating 'gcode_macro _km_print_status:gcode': UndefinedError: 'list object' has no attribute 'clear' |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Ugh, I bet you're running Klipper in python 2, and it appears that You'll want to roll back to the revision before the status events were introduced. That means you need to ssh into the klipper host, cd to the klipper-macros directory, and run this command:
I'll figure out a python 2 compatible fix and try to get it landed today. After that you should be able to update without issue. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick response.
I looked up how to upgrade to python3.
On the different discussion forums I read there was in the past no special reason why we should change to python3.
Since you seem to prefer python3, can you maybe tell me why you seem to have a preference for python3 ?
Have a nice day,
Nicolas
Van: Justin Schuh ***@***.***>
Verzonden: woensdag 31 mei 2023 0:45
Aan: jschuh/klipper-macros ***@***.***>
CC: xoga74 ***@***.***>; Author ***@***.***>
Onderwerp: Re: [jschuh/klipper-macros] Since latest update i got message "Error evaluating 'gcode_macro _km_print_status:gcode': UndefinedError: 'list object' has no attribute 'clear'" (Discussion #125)
Actually, you don't need to bother rolling back. I just pushed a fix to main in <b53e538> b53e538, so if you update it should be fine.
—
Reply to this email directly, view it on GitHub <#125 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACWL3J7BAOQGGFIPRAUJE3TXIZZ6HANCNFSM6AAAAAAYUSWSO4> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/ACWL3J2W76FS63HQOZO233DXIZZ6HA5CNFSM6AAAAAAYUSWSO6WGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQALQ3OM.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
I think you misunderstood my last reply. You just need to update klipper-macros to pull in b53e538, which will work with python 2. Accepting that, the fact is that no one should be running python 2. It's abandoned software that's been deprecated since 2010 and EOL'd since 2020. It hasn't received bug fixes or security updates in over three years (and it never will). It's also not targeted by any actively maintained software, meaning incompatibilities like the one you hit will continue to creep in over time, and it's unreasonable to expect maintainers to endlessly hack around them (like I just had to). |
Beta Was this translation helpful? Give feedback.
-
Tx your update works and I just moved to python 3 so I won’t bother you with it in the future. Tx for the advise and happy printing.
Also big thank you for the great work you are doing. I’ll be happy to become a tester in the future if you need some…
Nicolas
Van: Justin Schuh ***@***.***>
Verzonden: woensdag 31 mei 2023 15:20
Aan: jschuh/klipper-macros ***@***.***>
CC: xoga74 ***@***.***>; Author ***@***.***>
Onderwerp: Re: [jschuh/klipper-macros] Since latest update i got message "Error evaluating 'gcode_macro _km_print_status:gcode': UndefinedError: 'list object' has no attribute 'clear'" (Discussion #125)
I think you misunderstand. As I noted in my last comment, you just need to update klipper-macros to pull in <b53e538> b53e538, which will work with python 2.
Accepting that, the fact is that no one should be running python 2. It's abandoned software that's been deprecated since 2010 and EOL'd since 2020. It hasn't received bug fixes or security updates in over three years (and it never will). It's also not targeted by any actively maintained software, meaning incompatibilities like the one you hit will continue to creep in over time, and it's unreasonable to expect maintainers to endlessly hack around them (like I just had to).
—
Reply to this email directly, view it on GitHub <#125 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACWL3J2JVOTSYBFRQJH723TXI5ARJANCNFSM6AAAAAAYUSWSO4> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/ACWL3JYN3PQBRXCXIHOUHOTXI5ARJA5CNFSM6AAAAAAYUSWSO6WGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQALRIGO.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Thanks, glad it's all sorted. Closing this since the compat issue is fixed on main. |
Beta Was this translation helpful? Give feedback.
Ugh, I bet you're running Klipper in python 2, and it appears that
list.clear()
was added in python 3. Sorry, sometimes it's hard to keep track of the discrepancies between python 2 and 3.You'll want to roll back to the revision before the status events were introduced. That means you need to ssh into the klipper host, cd to the klipper-macros directory, and run this command:
I'll figure out a python 2 compatible fix and try to get it landed today. After that you should be able to update without issue.