#Error trying to import afcDeltaTime, [Solved]

1 messages Β· Page 1 of 1 (latest)

clear thicket
#

so i tried updating the new update after a few weeks of irl making it hard for me to get to it but now when i try to i updated it through putty in ssh instead of on mainsail but and i tried todo the recomented error msg step but it still dosent wanna import delta time i could use a bit of help

#

<@&1304550334839918672>

#

any thoughts?

halcyon crescent
clear thicket
#

klipper/klippy/extras/AFC_assist.py klipper/klippy/extras/AFC_NightOwl.py
klipper/klippy/extras/AFC_BoxTurtle.py klipper/klippy/extras/AFC_poop.py
klipper/klippy/extras/AFC_BoxTurtle.pyc klipper/klippy/extras/AFC_prep.py
klipper/klippy/extras/AFC_buffer.py klipper/klippy/extras/AFC_prep.pyc
klipper/klippy/extras/AFC_error.py klipper/klippy/extras/AFC.py
klipper/klippy/extras/AFC_error.pyc klipper/klippy/extras/AFC.pyc
klipper/klippy/extras/AFC_extruder.py klipper/klippy/extras/AFC_respond.py
klipper/klippy/extras/AFC_extruder.pyc klipper/klippy/extras/AFC_respond.pyc
klipper/klippy/extras/AFC_form_tip.py klipper/klippy/extras/AFC_spool.py
klipper/klippy/extras/AFC_form_tip.pyc klipper/klippy/extras/AFC_spool.pyc
klipper/klippy/extras/AFC_functions.py klipper/klippy/extras/AFC_stepper.py
klipper/klippy/extras/AFC_functions.pyc klipper/klippy/extras/AFC_unit.py
klipper/klippy/extras/AFC_hub.py klipper/klippy/extras/AFC_unit.pyc
klipper/klippy/extras/AFC_led.py klipper/klippy/extras/AFC_utils.py
klipper/klippy/extras/AFC_logger.py klipper/klippy/extras/AFC_utils.pyc

halcyon crescent
#

Hm, everything should be there...

clear thicket
#

a few are greyed out

#

idk if that helps

halcyon crescent
clear thicket
#

fair xD

halcyon crescent
#

Let's just try it all again:

cd ~/AFC-Klipper-Add-On/
./install-afc.sh
<press U two times>
clear thicket
#

allready did

#

i have tried that step xD

#

if u look up in chat

#

that was the 2th reinstall of the update

#

#1355472688604512379 message

#

but just in case

#

same result

halcyon crescent
#

Is the AFC the current version, i.e. did you run a git pull before?

clear thicket
#

afc is currently

#

AFC Klipper Add On
v1.0.4-4-g75b631c3

#

and i updated through the ssh install hit msg to update afc klipper addon

#

not through mainsail

halcyon crescent
#

Hm.

#

I guess service klipper restart doesn't change anything?

clear thicket
#

if this info helps il provide it just in case

#

im running a pi 3b+

#

with python 3

#

abd yes service klipper restart dosent help

#

and*

halcyon crescent
#

Could you upload your klipper log please?

clear thicket
halcyon crescent
#

Ok, that helps. Found something. Give me a few minutes to figure out something.

clear thicket
#

tyt

halcyon crescent
#

Which exact version of Python are you using?

#

I bet it's < 3.8.

clear thicket
#

i cant remember

#

whats the command to check again

halcyon crescent
#

~/klippy-env/bin/python --version

clear thicket
#

well

#

ur almost right in the version

#

Python 3.7.3

halcyon crescent
#

AFC requires >= 3.8, unfortunately.

clear thicket
#

it worked fine on 3.7.3

#

before the update

#

but i guess il have to update

halcyon crescent
#

The error is caused because Python 3.7 doesn't understand some syntax that AFC uses. The code using this syntax is probably new.

clear thicket
#

yep so now i need to find the command to update the puthon

halcyon crescent
#

Yeah. You need to recreate the klippy-env.

clear thicket
#

so git reset --hard im persunming

halcyon crescent
#

In which directory?

clear thicket
#

pi@mainsailos:~ $ ~/klippy-env/bin/python --version
Python 3.7.3

halcyon crescent
#

No, no git reset there.

#

Do you even have a newer version on python on your host? What does python --version (without the ~/klippy-env/bin/ part) output?

clear thicket
#

that one is reporting 2.7.16

#

pi@mainsailos:~ $ python --version
Python 2.7.16

halcyon crescent
#

And python3 --version?

clear thicket
#

Python 3.7.3

#

ik my system config is a mess on this printer as its a test bed while im slowly self sourcing parts for a 300mm voron 2.4

halcyon crescent
#

When's the last time you updated your system? πŸ˜‰
An which Debian version are you running?

#

3.7 is old.

clear thicket
#

Debian version idk

#

last time i updated my sistem last year i think

#

system*

halcyon crescent
clear thicket
#

when i first added the box turtle and installed canbus

#

pi@mainsailos:~ $ cat /etc/debian_version
10.13

halcyon crescent
#

Yeah, that's old, too. Current one is 12.

clear thicket
#

as i said the system is a mess xD

#

its long overdue for a overhaul

halcyon crescent
#

Try sudo apt update, followed by apt info python3.
This will not upgrade installed software, but should show the newest Python3 available to you.

halcyon crescent
clear thicket
#

xD

#

but i havent rly had a need to update it til now

#

now it all seems to be colliding with this old build

#

cant wait to finish my 2.4

#

xD

#

ok so its done and reporting this

halcyon crescent
#

Now apt info python3.

clear thicket
#

pi@mainsailos:~ $ apt info python3
Package: python3
Version: 3.7.3-1
Priority: optional
Section: python
Source: python3-defaults
Maintainer: Matthias Klose [email protected]
Installed-Size: 191 kB
Provides: python3-profiler
Pre-Depends: python3-minimal (= 3.7.3-1)
Depends: python3.7 (>= 3.7.3-1~), libpython3-stdlib (= 3.7.3-1)
Suggests: python3-doc (>= 3.7.3-1), python3-tk (>= 3.7.2-1~), python3-venv (>= 3.7.3-1)
Replaces: python3-minimal (<< 3.1.2-2)
Homepage: https://www.python.org/
Cnf-Extra-Commands: python
Cnf-Priority-Bonus: 5
Download-Size: 61.5 kB
APT-Manual-Installed: no
APT-Sources: http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
Description: interactive high-level object-oriented language (default python3 version)
Python, the high-level, interactive object oriented language,
includes an extensive class library with lots of goodies for
network programming, system administration, sounds and graphics.
.
This package is a dependency package, which depends on Debian's default
Python 3 version (currently v3.7).

halcyon crescent
#

Yeah, was afraid it's going to say that...

#

Tbh, I don't see a nice and easy solution atm.

clear thicket
#

ugh

#

so in other words the newest boxturtle update has bricked the printer for now

halcyon crescent
#

It has broken AFC. If you remove AFC, everything else should continue to work.

#

We either have to get your printer up-to-date, or we need a change in AFC to make it compatible with Python 3.7 again.

clear thicket
#

well as far as i see im the only one with the issue so best option for the wider community would be me just giving the printer a overhaul xD

halcyon crescent
#

It would also make you future proof. You can expect support for 3.7 to drop from other software as well.

clear thicket
#

welp guess im picking up a pi 4 or 5

halcyon crescent
#

A pi 5 is overkill, if you ask me. For just running Klipper, a pi 4 is more than enough.

#

We could downgrade your AFC for now.

clear thicket
#

true

halcyon crescent
#

Let me find out which revision did introduce that syntax that 3.7 doesn't like.

clear thicket
#

allright

#

otherwise idm upgrading the pi

#

the pi im running this off is a 3b+ from 2018

#

so its way overdue for a upgrade

halcyon crescent
#

I certainly would advise updating your system. At least the software.
But there's no harm in getting your AFC to work again in the meantime.

clear thicket
#

true but its not crusial to get it working right this minute xD

#

i still got 2 other printers to use in the meantime

#

plus if i upgrade to a pi 4 i can get the hard reset the pi 3b+ and use it on the prusa i3 mk3s+

halcyon crescent
#

Ok, in that case downgrading AFC might be a waste of time.

clear thicket
#

yep il just have to wait til payday on monday

#

otherwise il just keep trying to jailbreak the a1 mini

halcyon crescent
#

lol. And then port AFC to it πŸ˜‰

#

A1 mini with a BT πŸ˜„

clear thicket
#

xD exactly xD

#

like imagin if we could spoof bambu commands for the box turtle onto bambu machine

#

that would be awesome

#

like i allready am working on jailbreaking the ams lite for other printers

#

but if we could get box turtle to run on bambu

#

xD

#

eitherway il not end this discussion threat right now as the problem isnt solved but il come back when i get the pi 4

#

wait i just realised what if we made the box turtle prusa compatible xD

#

that could be funny xD

halcyon crescent
halcyon crescent
#

You too.

gaunt imp
#

Thanks for bringing this up, I'll update the install script to explicitly fail if python < 3.8 is found

clear thicket
#

no problem

#

it just came along as i was trying to update

clear thicket
#

hey rolf quick question im looking at all the pi4's and i see some have 1gb and some have 8gb ram wich one would u recoment?

clear thicket
halcyon crescent
clear thicket
#

Ok il be getting a 2gb to be aafe then

#

Thanks for the awnser

clear thicket
#

Pi arrived 2gb model will be redoing all system configs on it so when its all done its up to date

clear thicket
#

currently prepping a brand new sd card for the new pi with mainsailos only on it then after il update all system needs

obsidian lantern
clear thicket
#

that might be a bit of a issue right now my sd card reader is giving me issues with trying to write to the new sd card

#

so i might have to change from my desktop to laptop for the writing

#

gotta love technology at times xD

#

ok laptop is ready

#

where do i find the raspbian lite in the raspberry pi imager

obsidian lantern
#

its under raspbian Pi OS (other)

clear thicket
#

found it tho its calling itself raspberry pi os lite even tho its acually raspbian

obsidian lantern
#

yeah, it just donesn't have the full Desktop pieces that the Full OS has

clear thicket
#

makes sense

#

makes it perfect for newest packages and then useing kiauh to install mainsail

obsidian lantern
#

yeah, kiauh just does more heavy lifting this way

clear thicket
#

well wont be a issue i managed to copy printer.cfg and so on from the old pi and i can still boot up the old pi to retrive more stuff

obsidian lantern
#

but the Bookwork raspbian seems to be much better more stable for TTC errors on klipper

#

nice!, make sure to grab the moonraker database too if you want to keep print hours and such

clear thicket
#

na i aint worried about the database

#

after all its a test bench printer that i usually swap components to test on

#

so updating it and getting it back to working order means i can start the next upgrade sooner than later

#

wich will be a diy trident mod

obsidian lantern
#

lol fair enough I just try to keep an eye on hours for maintenance cycles

clear thicket
#

lol i will be doing that on my v2.4 im building rn

#

but for a half assed mercury one.1 that i keep swapping components on

#

it just aint worth the effort to keep data that keeps changing

obsidian lantern
#

Those hours rack up fast sometimes

clear thicket
#

yes they xD

#

plus now that the mercury is finaly getting a new pi

#

i can start my side project

#

installing klipper on a prusa i3 mk3s+

obsidian lantern
#

lol, seems like a waste but good luck

clear thicket
#

lol aint a waste

#

the prusa works but its slow and outdated

#

while i would normaly buy the upgrade to mk 3.5

#

it aint in the budget atm

#

so im making due with what i have on hand

obsidian lantern
#

fair, I tried to upgrade my first printer but now its in pieces

clear thicket
#

lol thats why i upgraded my 2th printer first

#

cause the 2th one was a 2th hand ender 5

#

so i made it a test bed

#

and the prusa made parts for it

#

but now that im used to klipper the prusa is slow in compairson

#

so if i gotta upgrade the test bed to a pi4 i got a left over pi3b+

#

so might aswell try to make it work

#

xD

#

and ugh

#

now the raspberry wont let me ssh

#

into it

obsidian lantern
#

not on the network maybe?

gaunt imp
#

Or did you not enable it in the imager?

clear thicket
#

its on the network

#

and its enabled

#

so il probably do what i usually do whipe it and retry

#

would probably help if i move out soon to have full control over my network instead of useing the parents net

#

and im back in it

#

turns out the router was treating the new pi like a intruder so had to whitelist it

#

now im ssh'd in and updating everything

#

installing klipper then mainsail

#

and yes im running through kiauh xD

#

its back up

#

now i just need to grab my print start config reinstall afc and port my afc folder update all system packages and that should be ready

obsidian lantern
#

yeah this is when all the extras get annoying lol, then time to clone it for backup reasons

clear thicket
#

lol well atleast all my dependancies is done

#

now i need to get the afc folder then update afc

#

plus the print start

#

and since kamp is build into klipper now i dont need to redownload it

#

but first a dinner break xD

clear thicket
#

got back from dinner and realised

#

fk now i need to redo canbus

#

Ugh

obsidian lantern
#

πŸ˜… hopefully following the guide makes it easy. No need to flash anything

clear thicket
#

well it seems im encountering a problem

#

sigh

#

nvm found out why

#

nvm

#

aparently installing katapult didnt help

clear thicket
obsidian lantern
clear thicket
#

funny enough i did

obsidian lantern
#

why are you in nano then?

clear thicket
#

cause as far as i remember thats usually the way

obsidian lantern
#

no necessary if you're following that guide

clear thicket
#

weird guess il try following through the guide

#

done

#

guess once its reloaded

#

il see if that worked

#

til then once i restarted il reinstall afc

#

cause rn the pi isnt installed on the printer

#

its just on the side of my desk

#

To change the printer config directory, please re-run this script with a '-m <pa th>' option.
β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„

#

new error yay!

#

nvm

#

got pastt it

clear thicket
#

ok moment of truth

#

or wait nvm

#

was about to go install it when i saw a error

#

fixed

#

moment of truth time to go install the pi

#

brb

#

first error is good error

#

huge success

#

i will thank everyone here for theyr help from figureing out i needed a new pi to acually getting all this done

#

i can say this problem is solved

#

Error trying to import afcDeltaTime, [Solved]

light mist
# clear thicket got pastt it

How did you get around this "To change the prenter config directory" issue? I installed AFC on my other SOC (CB1) and it ran fine, but now on the CM5 it's giving me that issue. Do I need to actually specify a path, or just add -m <path> after running the .sh command?

distant gorge
distant gorge
# light mist

are you trying to change the printers config directory or install AFC?

light mist
#

I just want to install AFC. When I run the standard script cd ~ git clone https://github.com/ArmoredTurtle/AFC-Klipper-Add-On.git cd AFC-Klipper-Add-On ./install-afc.sh The screen launches and I try to install and I get that error that won't let me progress.

distant gorge
#

press I instead of 1

light mist
#

LOL