-
Notifications
You must be signed in to change notification settings - Fork 39
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
Printer instance has no attribute 'try_load_module' #73
Comments
The problem is related to the big klipper commit that has been done a few
days ago.
It made some changes to the gcode.py file with that the change that Stephan
has made in that file to make dwc2 working are not inline with the new file
structure.
We need to revert to an older commit and wait for Stephan to make the
changes needed in order to get that fixed.
…On Sat, May 9, 2020, 10:35 PM markwinger ***@***.***> wrote:
I have been trying to install dwc2 for 2 days. I was running octoprint
with klipper and tried installing as described at:
https://github.com/Stephan3/dwc2-for-klipper
but that fails at wget
https://github.com/chrishamm/DuetWebControl/releases/download/2.1.6/DuetWebControl-SBC.zip
with the error indicating 2.1.6 does not exist. I tried using:
wget
https://github.com/chrishamm/DuetWebControl/releases/download/2.0.0-RC5/DuetWebControl.zip
which is described at:
https://klipper.info/klipper-+-dwc2-1/installing-dwc2
That installed but the gui would not come up. If I open octoprint the
klipper console "status" says:
Internal error during connect: Printer instance has no attribute
'try_load_module'
I even tried installing on a clean raspbian system with the installer.sh
descibed at:https://github.com/manu7irl/klipper-DWC2-installer?files=1.
I only have one printer so this is more that I need but I tried it anyway.
With this I could not get dwc2, or octoprint guis to open and of course
klipper then is not running.
I did install this a few months ago and it worked but I decided not to
switch then so went back to octoprint. (no longer installed).
*The dwc2 gui fails to open(Unable to connect), and klipper does not start
with this try_load_module error.*
What next????
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#73>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAWT4RBEK3CRMZKZRFGAXQ3RQWV7JANCNFSM4M45TLGA>
.
|
On github 2.1.7 it showed a duetwebcontrol-SD.zip so I tried that too. No difference. |
@manu7irl you pointed the Klipper commit allready. I have not the time doing much theese days. |
I will try to make the changes needed to your sed commands. I will try to
send a pr.
…On Sat, May 9, 2020, 11:03 PM Stephan ***@***.***> wrote:
@manu7irl <https://github.com/manu7irl> you pointed the Klipper commit
allready. I have not the time doing much theese days.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAWT4RHAWH6TTR7OMUGUCB3RQWZKJANCNFSM4M45TLGA>
.
|
Octoprint works with klipper if I comment out the [web_dwc2] section. |
If you are desperate to try something other then Octoprint you could try |
I had the same issue today while doing a fresh install. Try changing at line 49 in the web_dwc2.py "try_load_module" with "load_object". As stated before there was a commit in klipper where they renamed try_load_module() to load_object(). |
a simple sed command to replace try_load_module with load_object works. |
@pluuuk: Are you on the latest Klipper? Simply replacing the "try_load..." to "load_object" seems not enough. "gcode.py" also has been modified in the latest version, so the original patch probably needs to be updated also. |
I am away now but i will try the fix tomorrow and update.
Get BlueMail for Android<http://www.bluemail.me/r?b=15860>
On May 10, 2020, at 4:57 PM, pluuuk <notifications@github.com<mailto:notifications@github.com>> wrote:
@Szeker<https://github.com/Szeker> , I opened #74<#74> with the fixes to get dwc2 working again.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#73 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABNGCRC3W4USM3POAODZYG3RQ4PNVANCNFSM4M45TLGA>.
|
OK, one install says to use wget https://github.com/chrishamm/DuetWebControl/releases/download/2.1.6/DuetWebControl-SBC.zip. But this does not exist, I get 2020-05-11 06:55:38 ERROR 404: Not Found. The other: wget https://github.com/chrishamm/DuetWebControl/releases/download/2.0.0-RC5/DuetWebControl.zip is well over a year old. There are no SBC files after 2.1.4. What do you recommend? |
|
OK, that was the last one I pulled. So just to clarify (I don't understand git) if I just repeat the install process these fixes will get installed? |
Ok, I tried again and installed using the method here: https://github.com/Stephan3/dwc2-for-klipper Same problem. I modified klippy/extras/web_dwc2.py changing try_load_object to load_object. But the klipper logs show: |
you need to clone @pluuuk folder instaed of Stephan because this work is not merged yet... |
Ok, still no joy. I used the instructions on the page you pointed to, substituting pluuuk for Stephan3 on the clode of dwc2-for-klipper.git. The install seems to work. Octoprint no longer complains about try_load_module, but when I open ip:4750, no gui. (Unable to connect) |
Use my script and report there I got it patched, AFAIK, it should work now.
https://github.com/manu7irl/klipper-dwc2-installer
…On Tue, May 12, 2020, 1:00 AM markwinger ***@***.***> wrote:
Ok, still no joy.
I used the instructions on the page you pointed to, substituting pluuuk
for Stephan3 on the clode of dwc2-for-klipper.git. The install seems to
work. Octoprint no longer complains about try_load_module, but when I open
ip:4750, no gui.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAWT4RGIS7APKBCHLFYBGTTRRBYOHANCNFSM4M45TLGA>
.
|
I just tried to install dwc2 with it and it complains that the PrinterFarm direcoty does not exist. Do I need to unistall everything and install everything with you script to move it all to the PrinterFarm? |
@markwinger, did you configure the virtual_sdcard and patched gcode.py using the sed commands? |
@manu7irl, the dwc2-for-klipper repo is 7 months old. I'm not sure if @markwinger will be able to use your installer. |
These are the ammended instructions to run the fork that fixes these issues:
You will still need to configure the virtual_sdcard as in the readme |
Yes: and yes What about PrinterFarm directory? Do I have to uninstall klipper and resinstall it with your script? Klipper is installed and running with octoprint and I would like to keep it and add dwc2 so I can use either as I did when I tried it a few months ago. Can that be done with you installer.sh script? |
@markwinger , please see my last comment, I changed some things in the fork to remove the need to run the sed commands to modify gcode.py. This should allow you to install this much easier. |
This still fails: I changed it to 2.1.7/DuetWebControl-SD.zip. Installed ok, but klipper fails to start again with a new error as shown in octoprints klipper console: |
make sure you're running a clean klipper install, it seems you're running a
modified gcode.py
```
cd klipper
git checkout -- klippy/gcode.py
```
Should help you clean it up.
…On Mon, May 11, 2020, 6:00 PM markwinger ***@***.***> wrote:
This still fails:
wget
https://github.com/chrishamm/DuetWebControl/releases/download/2.1.6/DuetWebControl-SBC.zip
I changed it to 2.1.7/DuetWebControl-SD.zip.
Installed ok, but klipper fails to start again with a new error as shown
in octoprints klipper console:
Internal error during connect: GCodeParser instance has no attribute
'register_respond_callback'
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEMFV6EEOZXUIKFZGGYSO4LRRCNSVANCNFSM4M45TLGA>
.
|
No change. So I deleted gcode.py, then did checkout again. Still no change. |
Can you run this and see if you still see the issue?
|
Try changing the macro name to capitals......MY_PAUSE.
…On Tue, 12 May 2020, 19:55 markwinger, ***@***.***> wrote:
About pause. If I pause using the pause button it stops and resume
restarts but doe no retraction or head positioning. The docs for it say
that pause executes the pause.g system macro. Under system I see no macros,
only config.g which is printer.cfg. I'm guessing if I want to change the
pause functionality I need to create a pause macro, the current behavior is
a default and there is no macro. Is that correct?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGLJBBIWB2FYM7VANFWX4TDRRGLTPANCNFSM4M45TLGA>
.
|
G29 is already caps and it does not work. (long print still running so I cant change anything yet) None of my macros can be executed or edited in the file management section. Should I be able to edit them? |
Is this a typo?
|
I beleive, it is "UPLOAD AND START" = select file and start SD print, so first load the file => M23, than start printing => M24. So NOT a typo. |
@tripstar76 and @Szeker, can you provide your comments about the fixes on #75? |
Changed the macro to MY_PAUSE. No Change. |
@markwinger , I have fixed the macro issue. |
Again, I don't know how git works so what commands do I issue to pull from #75. |
I'm assuming that you installed using my instructions, so simply running |
Progress, I can now run macros. |
I don't think that's ever been supported.
…On Tue, May 12, 2020, 8:49 PM markwinger ***@***.***> wrote:
Progress, I can now run macros.
I still cannot edit from file management. Is that supported?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEMFV6HW7JNL2DSDZATKRILRRIKEBANCNFSM4M45TLGA>
.
|
Macros are working. So I wanted to try get the pause/resume buttons to run custom pause/resume gcode. Things you should know says: So I simply changed my_pause, my_resume macro names to pause_print and resume_print, restarted firmware and stated a print. While printing I paused the print. The printer stopped and dwc2 pops up: connection interupted attempting to reconnect. The gui is continuously flashing with this error. The klipper log shows: |
I tried a different approach. I renamed pause_print, resume_print to my_pause_print and my_resume_print so they would not be executed but the pause/resume buttons. At this point printer showed print 100% complete with hotend and bed at target temperatures. I waited 10 minutes to confirm idle timeout turned off heaters. That worked. So I repeated the process using the my_pause_printer and my_resume_print macros to see if they work correctly. But got the error about white space in the json file again. Rebooted, ran some macros ok, so tried again. While printing, all macros report the white space error. So the problem now appears to be macros work, but not while printing. I attached my printer.cfg file. |
I tried my filament runout renabling octoprint and it fails to start correctly that way as well. How do I disable dwc2 to insure it is not interfering with octoprint? |
You can rename the file in:
klipper/klippy/extras/dwc2-for-klipper.py to dwc2-for-klipper.py.bak
To enable it again, rename it back to the original extension.
…On Wed, May 13, 2020, 11:42 AM markwinger ***@***.***> wrote:
I tried my filament runout renabling octoprint and it fails to start
correctly that way as well. How do I disable dwc2 to insure it is not
interfering with octoprint?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEMFV6EPRSBJ6LDF7H43W43RRLSYLANCNFSM4M45TLGA>
.
|
|
@markwinger , can you please run
And retest? |
I have not tried your change yet. But I have a new piece of info. I did a pause, which saves the temp. I did a resume which resets the temp with an M109. The print resumed immediately but the temp target did not change. I waited a minute or two and did a pause again. At this point the M109 must have been issued because the target changed back to the original temp. When the target temp was reached, the resume took place. This is really interesting. Here is the resume macro. Notice the reset_temp is the first thing done. Which should wait for target temperature before continuing. But I see the SET_IDLE_TIMEOUT when the resume was done as if it skipped the reset_temp. But then the reset_temp appears to run later when I run the pause. Seems like we have an sequencing issues here. I cant do the pull right now but hopefully I can in an hour or 2. |
I did your pull. Although I don't know how your code works, it appears that the macros are forked or run in a different thread so the job will continue to run even though the macro is waiting. This clear when I do a resume, the print starts immediately, not waiting for the macro to complete. I arrive at this conclusion because when I do resume and pause again before the m109 of the previous macro is complete, the next macro does not start until the m109 is done. i.e it keeps printing until the target temp is reached, then it pauses. I also see the message saying the idle_timeout has changed reinforcing this conclusion. A different issue, if I pause the job 3 time is goes to done. There must be some pause_resume limit imposed somewhere. Also, I see popups occasionally saying something like "response too long. See console" But the console doesn't show it. |
@markwinger , do the macros work when you run octoprint? I'm not familiar with the macro syntax, but why do you specify "reset_temp" and "resume" are those variables you have defined? |
Yes, the macros work in octoprint. Then I have RESUME_PRINT which is called by a menu selection. Also because of the name it is called by dwc2 when the "Resume" button is clicked. This macro calls macro reset_temps, which simply sends an M109 with the nozzle target temp saved by my_temps. The M109 is supposed to pause until target temp is reached. When reset_temps returns to RESUME_PRINT, the idle_timeout is set back to 600 and resume is called telling klipper to resume. The M109 not causing the print to wait, but another macro to pause is where my problem seems to be originating. |
One more issue I noticed. After this testing I end up with the job done/cancelled/??? but the bed and nozzle heaters are still on. So I tried going to tools->control-all-> everything off. I get an error: G10 P0 R-273.15 S-273.15 M140 P0 S-273.15 Wow, absolute 0. That's cool. Cooler that the climate here in Minnesota. |
I must be missing something. I cannot get this to work for the life of me. There seems to be multiple commands that claim to work and nothing works for me. Any idea whats wrong?
|
I think I know what my main problem is. When you click the resume button, the printer is resumed then the macro is run. In octoprint, the macro is run first. So I tried creating resume.g macro, and renamed the macro RESUME_PRINT to MY_RESUME_PRINT so dwc2 does not run it. I then created a dwc2 macro called my_resume_print, and ran it directly with out clicking the resume button. The macro runs properly, but dwc2 continues to stay paused. Temp goes up correctly, idle_timeout get set when temp hits target, but dwc2 does not resume. Clipper however is in a different state. The logs show: So my macro worked, klipper is ready to go, but dwc2 is not resumed. So I have 2 problems, and they may not be solvable |
I'm switching back to octoprint now. The number of issues I've seen is way too high right now, and I have barely even used it. I'll be happy to test fixes for you but for now, using dwc2 for everyday printing is just not worth it. |
TLDR |
I have been trying to install dwc2 for 2 days. I was running octoprint with klipper and tried installing as described at:
https://github.com/Stephan3/dwc2-for-klipper
but that fails at wget https://github.com/chrishamm/DuetWebControl/releases/download/2.1.6/DuetWebControl-SBC.zip
with the error indicating 2.1.6 does not exist. I tried using:
wget https://github.com/chrishamm/DuetWebControl/releases/download/2.0.0-RC5/DuetWebControl.zip
which is described at:https://klipper.info/klipper-+-dwc2-1/installing-dwc2
That installed but the gui would not come up. If I open octoprint the klipper console "status" says:
Internal error during connect: Printer instance has no attribute 'try_load_module'
I even tried installing on a clean raspbian system with the installer.sh descibed at:https://github.com/manu7irl/klipper-DWC2-installer?files=1.
I only have one printer so this is more that I need but I tried it anyway.
With this I could not get dwc2, or octoprint guis to open and of course klipper then is not running.
I did install this a few months ago and it worked but I decided not to switch then so went back to octoprint. (no longer installed).
The dwc2 gui fails to open(Unable to connect), and klipper does not start with this try_load_module error.
What next????
The text was updated successfully, but these errors were encountered: