CrealityOfficial / Ender-3_V3_KE_Klipper

clone from https://github.com/Klipper3d/klipper/
GNU General Public License v3.0
78 stars 13 forks source link

ImportError: cannot import name 'prtouch_v2_wrapper' from 'extras' #4

Open 0xD34D opened 8 months ago

0xD34D commented 8 months ago

After getting the mcu code compiled and flashed onto the printer, I get the following error when running the klippy host on a Raspberry Pi 4

[ERROR] 2024-01-15 08:56:21,724 [root] [klippy:_connect:248] Unhandled exception during connect
Traceback (most recent call last):
  File "/home/pi/Ender-3_V3_KE_Klipper/klippy/klippy.py", line 193, in _connect
    self._read_config()
  File "/home/pi/Ender-3_V3_KE_Klipper/klippy/klippy.py", line 159, in _read_config
    self.load_object(config, section_config.get_name(), None)
  File "/home/pi/Ender-3_V3_KE_Klipper/klippy/klippy.py", line 117, in load_object
    mod = importlib.import_module('extras.' + module_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/pi/Ender-3_V3_KE_Klipper/klippy/extras/prtouch_v2.py", line 7, in <module>
    from . import prtouch_v2_wrapper
ImportError: cannot import name 'prtouch_v2_wrapper' from 'extras' (/home/pi/Ender-3_V3_KE_Klipper/klippy/extras/__init__.py)

I noticed that https://github.com/CrealityOfficial/Ender-3_V3_KE_Klipper/blob/main/klippy/extras/prtouch_v2_wrapper.cpython-38-mipsel-linux-gnu.so appears to be built for MIPS architecture which might be problematic here.

Here's my host cpu info

Architecture:            aarch64
  CPU op-mode(s):        32-bit, 64-bit
  Byte Order:            Little Endian
CPU(s):                  4
  On-line CPU(s) list:   0-3
Vendor ID:               ARM
  Model name:            Cortex-A72
    Model:               3
    Thread(s) per core:  1
    Core(s) per cluster: 4
    Socket(s):           -
    Cluster(s):          1
    Stepping:            r0p3
    CPU(s) scaling MHz:  60%
    CPU max MHz:         1500.0000
    CPU min MHz:         600.0000
    BogoMIPS:            108.00
    Flags:               fp asimd evtstrm crc32 cpuid
felipejfc commented 8 months ago

Same problem here/ @CrealityTech can you please either share the source code so that we can compile this module, or distribute it for other architectures?

processor : 0 model name : ARMv8 Processor rev 4 (v8l) BogoMIPS : 48.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4

ninja- commented 8 months ago

https://github.com/CrealityOfficial/Ender-3_V3_KE_Klipper/issues/1#issuecomment-1895247755

henrivdr commented 5 months ago

@CrealityTech can we have feedback on this please. Same for the CR10 SE and K1 range.

Snows-cmd commented 1 month ago

is there an update on this? I am trying to run a raspberry pi based klipper on my KE and I keep on getting this error too.

henrivdr commented 1 month ago

It's pretty much a waste of time posting here. Is seems to be just a facade for Creality so they can claim to be "open source".

To make it worse z_compensate.py is also compiled , since the latest April release!!

@CrealityTech @Taylor111593 are you going to respond to us? You can just as well take down this repo (and the other ones) as it pretty useless and creates a false sense of hope for us.
If you prefer to exclude the community from contributing to the code, there is no use for it.

PS: I completely abandoned the auto zoffset. I do it manually , when needed. I also did a DIY conversion to the Unicorn nozzle, because it does not look like Creality is ever going to release a version for the CR10SE. It is either because of how the load cell works, or the fact that there seems to be very little effort behind spares for this printer in general.