Skip to content

bug: fix error due to outdated python-can version#2

Open
CaioIsCoding wants to merge 1 commit intoSovol3d:masterfrom
CaioIsCoding:patch-1
Open

bug: fix error due to outdated python-can version#2
CaioIsCoding wants to merge 1 commit intoSovol3d:masterfrom
CaioIsCoding:patch-1

Conversation

@CaioIsCoding
Copy link

@CaioIsCoding CaioIsCoding commented Jan 26, 2026

Fix Error on Klipper Install

/=======================================================\
|     ~~~~~~~~~~~~~~~~~ [ KIAUH ] ~~~~~~~~~~~~~~~~~     |
|        Klipper Installation And Update Helper         |
|     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     |
\=======================================================/

###### Initializing Klipper installation ...

/=======================================================\
| Please select your preferred Python version.          | 
| The recommended version is Python 3.x.                | 
|-------------------------------------------------------|
|  1) [Python 3.x]  (recommended)                       | 
|  2) [Python 2.7]  (legacy)                            | 
|-------------------------------------------------------|
|                       B) « Back                       |
\=======================================================/
###### Select Python version: 1
   [➔] Python 3.x

/=======================================================\
| Please select the number of Klipper instances to set  |
| up. The number of Klipper instances will determine    |
| the amount of printers you can run from this host.    |
|                                                       |
| WARNING:                                              |
| Setting up too many instances may crash your system.  |
|-------------------------------------------------------|
|                       B) « Back                       |
\=======================================================/
###### Number of Klipper instances to set up: 1
   [➔] Instance count: 1


###### Installing single Klipper instance ...

###### Checking for the following dependencies:
● git 
[✓ OK] Dependencies already met!

###### Cloning Klipper from https://github.com/Sovol3d/klipper ...
Cloning into '/home/sovol/klipper'...
remote: Enumerating objects: 2467, done.
remote: Counting objects: 100% (2467/2467), done.
remote: Compressing objects: 100% (1481/1481), done.
remote: Total 2467 (delta 961), reused 2461 (delta 955), pack-reused 0 (from 0)
Receiving objects: 100% (2467/2467), 18.47 MiB | 3.82 MiB/s, done.
Resolving deltas: 100% (961/961), done.
Updating files: 100% (2244/2244), done.
Already on 'master'
Your branch is up to date with 'origin/master'.

###### Reading dependencies...
virtualenv
python3-dev
libffi-dev
build-essential
libncurses-dev
libusb-dev
avrdude
gcc-avr
binutils-avr
avr-libc
stm32flash
libnewlib-arm-none-eabi
gcc-arm-none-eabi
binutils-arm-none-eabi
libusb-1.0
pkg-config
dfu-util

###### Installing packages...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libusb-1.0-0-dev' for regex 'libusb-1.0'
Note, selecting 'libusb-1.0-doc' for regex 'libusb-1.0'
Note, selecting 'libusb-1.0-0' for regex 'libusb-1.0'
avr-libc is already the newest version (1:2.0.0+Atmel3.6.2-1.1).
avrdude is already the newest version (6.3-20171130+svn1429-2+b1).
binutils-arm-none-eabi is already the newest version (2.35.2-2+14+b2).
binutils-avr is already the newest version (2.26.20160125+Atmel3.6.2-2).
build-essential is already the newest version (12.9).
dfu-util is already the newest version (0.9-1+b1).
gcc-arm-none-eabi is already the newest version (15:8-2019-q3-1+b1).
gcc-avr is already the newest version (1:5.4.0+Atmel3.6.2-1).
libffi-dev is already the newest version (3.3-6).
libusb-dev is already the newest version (2:0.1.12-32).
libusb-1.0-0 is already the newest version (2:1.0.24-3).
libusb-1.0-0-dev is already the newest version (2:1.0.24-3).
libusb-1.0-doc is already the newest version (2:1.0.24-3).
libncurses-dev is already the newest version (6.2+20201114-2+deb11u2).
libnewlib-arm-none-eabi is already the newest version (3.3.0-1).
pkg-config is already the newest version (0.29.2-1).
virtualenv is already the newest version (20.4.0+ds-2+deb11u1).
python3-dev is already the newest version (3.9.2-3).
stm32flash is already the newest version (0.5+git20200914+2b0f078-1).
0 upgraded, 0 newly installed, 0 to remove and 205 not upgraded.
[✓ OK] Klipper packages installed!

###### Installing Python 3.9.2 virtual environment...
created virtual environment CPython3.9.2.final.0-64 in 659ms
  creator CPython3Posix(dest=/home/sovol/klippy-env, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/sovol/.local/share/virtualenv)
    added seed packages: pip==20.3.4, pkg_resources==0.0.0, setuptools==44.1.1, wheel==0.34.2
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Requirement already satisfied: pip in /home/sovol/klippy-env/lib/python3.9/site-packages (20.3.4)
Collecting pip
  Using cached pip-25.3-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.3.4
    Uninstalling pip-20.3.4:
      Successfully uninstalled pip-20.3.4
Successfully installed pip-25.3
Collecting cffi==1.14.6 (from -r /home/sovol/klipper/scripts/klippy-requirements.txt (line 5))
  Using cached cffi-1.14.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (1.2 kB)
Collecting pyserial==3.4 (from -r /home/sovol/klipper/scripts/klippy-requirements.txt (line 6))
  Using cached pyserial-3.4-py2.py3-none-any.whl.metadata (1.6 kB)
Collecting greenlet==2.0.2 (from -r /home/sovol/klipper/scripts/klippy-requirements.txt (line 7))
  Using cached greenlet-2.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (4.1 kB)
Collecting Jinja2==2.11.3 (from -r /home/sovol/klipper/scripts/klippy-requirements.txt (line 8))
  Using cached Jinja2-2.11.3-py2.py3-none-any.whl.metadata (3.5 kB)
Collecting python-can==3.3.4 (from -r /home/sovol/klipper/scripts/klippy-requirements.txt (line 9))
  Using cached python_can-3.3.4-py2.py3-none-any.whl
Collecting markupsafe==1.1.1 (from -r /home/sovol/klipper/scripts/klippy-requirements.txt (line 10))
  Using cached MarkupSafe-1.1.1-cp39-cp39-manylinux2014_aarch64.whl.metadata (3.2 kB)
Collecting pycparser (from cffi==1.14.6->-r /home/sovol/klipper/scripts/klippy-requirements.txt (line 5))
  Using cached pycparser-2.23-py3-none-any.whl.metadata (993 bytes)
Collecting aenum (from python-can==3.3.4->-r /home/sovol/klipper/scripts/klippy-requirements.txt (line 9))
  Using cached aenum-3.1.16-py3-none-any.whl.metadata (3.8 kB)
Collecting wrapt~=1.10 (from python-can==3.3.4->-r /home/sovol/klipper/scripts/klippy-requirements.txt (line 9))
  Using cached wrapt-1.17.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.metadata (6.4 kB)
Using cached cffi-1.14.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (208 kB)
Using cached pyserial-3.4-py2.py3-none-any.whl (193 kB)
Using cached greenlet-2.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (607 kB)
Using cached Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
Using cached MarkupSafe-1.1.1-cp39-cp39-manylinux2014_aarch64.whl (33 kB)
Using cached wrapt-1.17.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (82 kB)
Using cached aenum-3.1.16-py3-none-any.whl (165 kB)
Using cached pycparser-2.23-py3-none-any.whl (118 kB)
Installing collected packages: pyserial, aenum, wrapt, pycparser, markupsafe, greenlet, python-can, Jinja2, cffi
   ━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/9 [aenum]ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.9/py_compile.py", line 144, in compile
    code = loader.source_to_code(source_bytes, dfile or file,
  File "<frozen importlib._bootstrap_external>", line 853, in source_to_code
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/sovol/klippy-env/lib/python3.9/site-packages/aenum/_py2.py", line 5
    raise exc, None, tb
             ^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/compileall.py", line 238, in compile_file
    ok = py_compile.compile(fullname, cfile, dfile, True,
  File "/usr/lib/python3.9/py_compile.py", line 150, in compile
    raise py_exc
py_compile.PyCompileError:   File "/home/sovol/klippy-env/lib/python3.9/site-packages/aenum/_py2.py", line 5
    raise exc, None, tb
             ^
SyntaxError: invalid syntax


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sovol/klippy-env/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 107, in _run_wrapper
    status = _inner_run()
  File "/home/sovol/klippy-env/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 98, in _inner_run
    return self.run(options, args)
  File "/home/sovol/klippy-env/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 85, in wrapper
    return func(self, options, args)
  File "/home/sovol/klippy-env/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 458, in run
    installed = install_given_reqs(
  File "/home/sovol/klippy-env/lib/python3.9/site-packages/pip/_internal/req/__init__.py", line 84, in install_given_reqs
    requirement.install(
  File "/home/sovol/klippy-env/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 781, in install
    install_wheel(
  File "/home/sovol/klippy-env/lib/python3.9/site-packages/pip/_internal/operations/install/wheel.py", line 737, in install_wheel
    _install_wheel(
  File "/home/sovol/klippy-env/lib/python3.9/site-packages/pip/_internal/operations/install/wheel.py", line 623, in _install_wheel
    success = compileall.compile_file(path, force=True, quiet=True)
  File "/usr/lib/python3.9/compileall.py", line 255, in compile_file
    msg = err.msg.encode(sys.stdout.encoding,
TypeError: encode() argument 'encoding' must be str, not None
sovol@SPI-XI:~/kiauh$ 

@CaioIsCoding
Copy link
Author

@JamesH1978

@CaioIsCoding CaioIsCoding changed the title Update klippy-requirements.txt bug: fix error due to outdated python-can version Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant