You may need to run python3 -m lib2to3 -w -n <file> the -m loads the library modules -w makes sure that the files it written -n does not save a backup
you may also need to run that a few times on the same file as I find that it sometimes does not pickup on all the changes the first (or even second time) until all the dialog is gone / cleared. On Wed, 11 Aug 2021 at 09:08, Rene Hopf via Emc-developers < [email protected]> wrote: > > > > On 11. Aug 2021, at 10:04, Rob C <[email protected]> wrote: > > > > Could it be: > > ImportError: No module named hal > > > > .... > > > > Therefore have you installed python3, given master has now changed to > > Python3, this may (will) also require GTK2 to become GTK3 and some of the > > dependencies will need to be located in the python3 dependencies folder > and > > not within the python2 folder (depending upon what gui you are using). > > Exactly. Run 2to3 -w on the file, and change the first line to python3, > that should fix it. > > > > >> On Wed, 11 Aug 2021 at 02:12, Gene Heskett <[email protected]> > wrote: > >> > >>> On Tuesday 10 August 2021 14:44:12 Gene Heskett wrote: > >>> > >>> Greetings all; > >>> > >>> After building LinuxCNC from master this morning, my rp4 fails to run > >>> LinuxCNC with this exit stanza: > >>> > >>> pi@rpi4:/media/pi/workspace $ linuxcnc -l > >>> LINUXCNC - 2.9.0~pre0 > >>> Machine configuration directory is > >>> '/home/pi/linuxcnc/configs/sheldon-lathe' Machine configuration file > >>> is '7i90-axis.ini' > >>> Starting LinuxCNC... > >>> Found file(REL): ./hm2-7i90-stepper.hal > >>> Note: Using POSIX realtime > >>> hm2: loading Mesa HostMot2 driver version 0.15 > >>> hm2_rpspi: Platform: Raspberry Pi 4 Model B Rev 1.1 > >>> hm2_rpspi: Base address 0xfe000000 size 0x01800000 > >>> hm2_rpspi: Mapped peripherals from 0xfe000000 (size 0x01800000) to > >>> gpio:0x0xb4300000, spi:0x0xb4304000, aux:0x0xb4315000 > >>> hm2_rpspi: SPI0/CE0 clock rate: 41666000/25000000 Hz, VPU clock rate: > >>> 500000000 Hz hm2_rpspi: SPI0/CE0 write clock rate calculated: 41666666 > >>> Hz (clkdiv=12) hm2_rpspi: SPI0/CE0 read clock rate calculated: > >>> 25000000 Hz (clkdiv=20) hm2_rpspi: SPI0/CE0 Valid cookie matched > >>> hm2_rpspi: SPI0/CE0 Base: hm2_7i90.0 > >>> hm2/hm2_7i90.0: Low Level init 0.15 > >>> hm2/hm2_7i90.0: MD 2: 3x IOPort v0: accepted, using 3 > >>> hm2/hm2_7i90.0: MD 0: 1x Hostmot2 DPLL v0: accepted, using 1 > >>> hm2/hm2_7i90.0: MD 1: 1x Watchdog v0: accepted, using 1 > >>> hm2/hm2_7i90.0: MD 3: 4x Encoder v2: accepted, using 4 > >>> hm2/hm2_7i90.0: MD 4: 2x PWMGen v0: accepted, using 1 > >>> hm2/hm2_7i90.0: MD 5: 4x StepGen v2: accepted, using 4 > >>> hm2/hm2_7i90.0: MD 6: 1x LED v0: accepted, using 1 > >>> hm2/hm2_7i90.0: 72 I/O Pins used: > >>> hm2/hm2_7i90.0: IO Pin 000 (P1-01): StepGen #0, pin Step (Output) > >>> hm2/hm2_7i90.0: IO Pin 001 (P1-03): StepGen #0, pin Direction > >>> (Output) hm2/hm2_7i90.0: IO Pin 002 (P1-05): StepGen #1, pin Step > >>> (Output) hm2/hm2_7i90.0: IO Pin 003 (P1-07): StepGen #1, pin > >>> Direction (Output) hm2/hm2_7i90.0: IO Pin 004 (P1-09): Encoder #0, > >>> pin A (Input) hm2/hm2_7i90.0: IO Pin 005 (P1-11): Encoder #2, pin > >>> A (Input) hm2/hm2_7i90.0: IO Pin 006 (P1-13): Encoder #0, pin B > >>> (Input) hm2/hm2_7i90.0: IO Pin 007 (P1-15): Encoder #2, pin B > >>> (Input) hm2/hm2_7i90.0: IO Pin 008 (P1-17): Encoder #0, pin Index > >>> (Input) hm2/hm2_7i90.0: IO Pin 009 (P1-19): Encoder #2, pin Index > >>> (Input) hm2/hm2_7i90.0: IO Pin 010 (P1-21): Encoder #1, pin A > >>> (Input) hm2/hm2_7i90.0: IO Pin 011 (P1-23): Encoder #3, pin A > >>> (Input) hm2/hm2_7i90.0: IO Pin 012 (P1-25): Encoder #1, pin B > >>> (Input) hm2/hm2_7i90.0: IO Pin 013 (P1-27): Encoder #3, pin B > >>> (Input) hm2/hm2_7i90.0: IO Pin 014 (P1-29): Encoder #1, pin Index > >>> (Input) hm2/hm2_7i90.0: IO Pin 015 (P1-31): Encoder #3, pin Index > >>> (Input) hm2/hm2_7i90.0: IO Pin 016 (P1-33): StepGen #2, pin Step > >>> (Output) hm2/hm2_7i90.0: IO Pin 017 (P1-35): StepGen #2, pin > >>> Direction (Output) hm2/hm2_7i90.0: IO Pin 018 (P1-37): StepGen #3, > >>> pin Step (Output) hm2/hm2_7i90.0: IO Pin 019 (P1-39): StepGen #3, > >>> pin Direction (Output) hm2/hm2_7i90.0: IO Pin 020 (P1-41): PWMGen > >>> #0, pin Out0 (PWM or Up) (Output) hm2/hm2_7i90.0: IO Pin 021 > >>> (P1-43): PWMGen #0, pin Out1 (Dir or Down) (Output) hm2/hm2_7i90.0: > >>> IO Pin 022 (P1-45): IOPort > >>> hm2/hm2_7i90.0: IO Pin 023 (P1-47): IOPort > >>> hm2/hm2_7i90.0: IO Pin 024 (P2-01): IOPort > >>> hm2/hm2_7i90.0: IO Pin 025 (P2-03): IOPort > >>> hm2/hm2_7i90.0: IO Pin 026 (P2-05): IOPort > >>> hm2/hm2_7i90.0: IO Pin 027 (P2-07): IOPort > >>> hm2/hm2_7i90.0: IO Pin 028 (P2-09): IOPort > >>> hm2/hm2_7i90.0: IO Pin 029 (P2-11): IOPort > >>> hm2/hm2_7i90.0: IO Pin 030 (P2-13): IOPort > >>> hm2/hm2_7i90.0: IO Pin 031 (P2-15): IOPort > >>> hm2/hm2_7i90.0: IO Pin 032 (P2-17): IOPort > >>> hm2/hm2_7i90.0: IO Pin 033 (P2-19): IOPort > >>> hm2/hm2_7i90.0: IO Pin 034 (P2-21): IOPort > >>> hm2/hm2_7i90.0: IO Pin 035 (P2-23): IOPort > >>> hm2/hm2_7i90.0: IO Pin 036 (P2-25): IOPort > >>> hm2/hm2_7i90.0: IO Pin 037 (P2-27): IOPort > >>> hm2/hm2_7i90.0: IO Pin 038 (P2-29): IOPort > >>> hm2/hm2_7i90.0: IO Pin 039 (P2-31): IOPort > >>> hm2/hm2_7i90.0: IO Pin 040 (P2-33): IOPort > >>> hm2/hm2_7i90.0: IO Pin 041 (P2-35): IOPort > >>> hm2/hm2_7i90.0: IO Pin 042 (P2-37): IOPort > >>> hm2/hm2_7i90.0: IO Pin 043 (P2-39): IOPort > >>> hm2/hm2_7i90.0: IO Pin 044 (P2-41): IOPort > >>> hm2/hm2_7i90.0: IO Pin 045 (P2-43): IOPort > >>> hm2/hm2_7i90.0: IO Pin 046 (P2-45): IOPort > >>> hm2/hm2_7i90.0: IO Pin 047 (P2-47): IOPort > >>> hm2/hm2_7i90.0: IO Pin 048 (P3-01): IOPort > >>> hm2/hm2_7i90.0: IO Pin 049 (P3-03): IOPort > >>> hm2/hm2_7i90.0: IO Pin 050 (P3-05): IOPort > >>> hm2/hm2_7i90.0: IO Pin 051 (P3-07): IOPort > >>> hm2/hm2_7i90.0: IO Pin 052 (P3-09): IOPort > >>> hm2/hm2_7i90.0: IO Pin 053 (P3-11): IOPort > >>> hm2/hm2_7i90.0: IO Pin 054 (P3-13): IOPort > >>> hm2/hm2_7i90.0: IO Pin 055 (P3-15): IOPort > >>> hm2/hm2_7i90.0: IO Pin 056 (P3-17): IOPort > >>> hm2/hm2_7i90.0: IO Pin 057 (P3-19): IOPort > >>> hm2/hm2_7i90.0: IO Pin 058 (P3-21): IOPort > >>> hm2/hm2_7i90.0: IO Pin 059 (P3-23): IOPort > >>> hm2/hm2_7i90.0: IO Pin 060 (P3-25): IOPort > >>> hm2/hm2_7i90.0: IO Pin 061 (P3-27): IOPort > >>> hm2/hm2_7i90.0: IO Pin 062 (P3-29): IOPort > >>> hm2/hm2_7i90.0: IO Pin 063 (P3-31): IOPort > >>> hm2/hm2_7i90.0: IO Pin 064 (P3-33): IOPort > >>> hm2/hm2_7i90.0: IO Pin 065 (P3-35): IOPort > >>> hm2/hm2_7i90.0: IO Pin 066 (P3-37): IOPort > >>> hm2/hm2_7i90.0: IO Pin 067 (P3-39): IOPort > >>> hm2/hm2_7i90.0: IO Pin 068 (P3-41): IOPort > >>> hm2/hm2_7i90.0: IO Pin 069 (P3-43): IOPort > >>> hm2/hm2_7i90.0: IO Pin 070 (P3-45): IOPort > >>> hm2/hm2_7i90.0: IO Pin 071 (P3-47): IOPort > >>> hm2/hm2_7i90.0: registered > >>> Traceback (most recent call last): > >>> File "/home/pi/linuxcnc/configs/sheldon-lathe/units.py", line 2, in > >>> <module> import hal, time, linuxcnc > >>> ImportError: No module named hal > >>> ./hm2-7i90-stepper.hal:39: waitpid failed > >>> /home/pi/linuxcnc/configs/sheldon-lathe/units.py units > >>> ./hm2-7i90-stepper.hal:39: > >>> /home/pi/linuxcnc/configs/sheldon-lathe/units.py exited without > >>> becoming ready > >>> Shutting down and cleaning up LinuxCNC... > >>> hm2: unloading > >>> THREADS: hal_exit 24 0 0MOTION: cleanup_module() started. > >>> MOTION: cleanup_module() finished. > >>> Note: Using POSIX realtime > >>> LinuxCNC terminated with an error. You can find more information in > >>> the log: /home/pi/linuxcnc_debug.txt > >>> and > >>> /home/pi/linuxcnc_print.txt > >>> as well as in the output of the shell command 'dmesg' and in the > >>> terminal =================== > >>> looking back thru the build history, I do not quickly see any hal > >>> errors. units.py is not part of linuxcnc but s/b as it is apparently > >>> the only way to tell a running hal whether it is in inch or metric > >>> mode. Its part of my axis display smarts. > >>> > >>> What can I do? > >>> > >>> Thanks all. > >>> > >>> Cheers, Gene Heskett > >> > >> I see Jeff did something to python, but its still the same failure. > >> > >> units.py is quite simple. > >> =========== > >> #!/usr/bin/env python > >> import hal, time, linuxcnc > >> h = hal.component("units") > >> h.newpin("G21", hal.HAL_BIT, hal.HAL_OUT) > >> h.newpin("G20", hal.HAL_BIT, hal.HAL_OUT) > >> h.ready() > >> s = linuxcnc.stat() > >> try: > >> while 1: > >> time.sleep(1) > >> s.poll() > >> if s.program_units == 1: > >> h['G21'] = 0 > >> h['G20'] = 1 > >> else: > >> h['G21'] = 1 > >> h['G20'] = 0 > >> except KeyboardInterrupt: > >> raise SystemExit > >> ============= > >> That is it in its entirety. But changing line one from python to python3 > >> fixed it. It running normally now ANAICT. > >> > >> Thank you Jeff. > >> > >> Cheers, Gene Heskett > >> -- > >> "There are four boxes to be used in defense of liberty: > >> soap, ballot, jury, and ammo. Please use in that order." > >> -Ed Howdershelt (Author) > >> If we desire respect for the law, we must first make the law > respectable. > >> - Louis D. Brandeis > >> Genes Web page <http://geneslinuxbox.net:6309/gene> > >> > >> > >> _______________________________________________ > >> Emc-developers mailing list > >> [email protected] > >> https://lists.sourceforge.net/lists/listinfo/emc-developers > >> > > > > _______________________________________________ > > Emc-developers mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/emc-developers > > > _______________________________________________ > Emc-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-developers > _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
