Picar-X Can't install picar-x module.,

Trying to build the picar-x module but running into the following:

TypeError: expected string or bytes-like object, got ‘NoneType’

Installed Raspberry Pi using the recommend image and got:

Linux pibot 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux

Following the instructions from:
https://docs.sunfounder.com/projects/picar-x/en/latest/python/python_start/install_all_modules.html

Full output below.

user@pibot:~/picar-x $ !18
sudo python3 setup.py install
Traceback (most recent call last):
File “/home/user/picar-x/setup.py”, line 17, in
setup(
File “/usr/lib/python3/dist-packages/setuptools/init.py”, line 107, in setup
_install_setup_requires(attrs)
File “/usr/lib/python3/dist-packages/setuptools/init.py”, line 75, in _install_setup_requires
dist = MinimalDistribution(attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/setuptools/init.py”, line 57, in init
super().init(filtered)
File “/usr/lib/python3/dist-packages/setuptools/dist.py”, line 473, in init
for ep in metadata.entry_points(group=‘distutils.setup_keywords’):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/importlib/metadata/init.py”, line 1040, in entry_points
return SelectableGroups.load(eps).select(**params)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/importlib/metadata/init.py”, line 476, in load
ordered = sorted(eps, key=by_group)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/importlib/metadata/init.py”, line 1037, in
eps = itertools.chain.from_iterable(
^
File “/usr/lib/python3.11/importlib/metadata/_itertools.py”, line 16, in unique_everseen
k = key(element)
^^^^^^^^^^^^
File “/usr/lib/python3.11/importlib/metadata/init.py”, line 954, in _normalized_name
or super().normalized_name
^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/importlib/metadata/init.py”, line 627, in normalized_name
return Prepared.normalize(self.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/importlib/metadata/init.py”, line 882, in normalize
return re.sub(r"[-
.]+", “-”, name).lower().replace(‘-’, '
')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/re/init.py”, line 185, in sub
return _compile(pattern, flags).sub(repl, string, count)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got ‘NoneType’
user@pibot:~/picar-x $

Did you follow the installation tutorial steps to install all the library codes? The installation must be done in order.

First, install the robot-hat library:

cd ~/
git clone -b v2.0 GitHub - sunfounder/robot-hat: Robot Hat python library
cd robot-hat
sudo python3 setup.py install

Next, install vilib:

cd ~/
git clone -b picamera2 GitHub - sunfounder/vilib: Vision library for python
cd vilib
sudo python3 install.py

Finally, install picar-x:

cd ~/
git clone -b v2.0 GitHub - sunfounder/picar-x
cd picar-x
sudo python3 setup.py install

And run i2samp.sh:

cd ~/picar-x
sudo bash i2samp.sh

Make sure that each library is installed successfully before moving on to the next one. If you encounter any errors during the installation process, please provide us with screenshots of the error messages.

Hi. Yes I installed all module in the same order they were documented in on that page, and had this issue when we got to the picar -x module.

I guess I can try working through the module install again from top to bottom just in case something got missed, Will do that and see if it resolves the issue.

I tried reinstall the modules as suggested. So I started with the robothat module but immediately get the same error now with this too. See output below.

I guess the next suggestion will be to blow away the current system and start over?

user@pibot:~ $ sudo rm -rf robot-hat/
user@pibot:~ $ git clone -b v2.0 GitHub - sunfounder/robot-hat: Robot Hat python library
Cloning into ‘robot-hat’…
remote: Enumerating objects: 1775, done.
remote: Counting objects: 100% (434/434), done.
remote: Compressing objects: 100% (180/180), done.
remote: Total 1775 (delta 281), reused 344 (delta 239), pack-reused 1341 (from 1)
Receiving objects: 100% (1775/1775), 19.68 MiB | 11.50 MiB/s, done.
Resolving deltas: 100% (1095/1095), done.
user@pibot:~ $ cd robot-hat/
user@pibot:~/robot-hat $ sudo python3 setup.py install
Traceback (most recent call last):
File “/home/user/robot-hat/setup.py”, line 31, in
setup(
File “/usr/lib/python3/dist-packages/setuptools/init.py”, line 107, in setup
_install_setup_requires(attrs)
File “/usr/lib/python3/dist-packages/setuptools/init.py”, line 75, in _install_setup_requires
dist = MinimalDistribution(attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/setuptools/init.py”, line 57, in init
super().init(filtered)
File “/usr/lib/python3/dist-packages/setuptools/dist.py”, line 473, in init
for ep in metadata.entry_points(group=‘distutils.setup_keywords’):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/importlib/metadata/init.py”, line 1040, in entry_points
return SelectableGroups.load(eps).select(**params)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/importlib/metadata/init.py”, line 476, in load
ordered = sorted(eps, key=by_group)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/importlib/metadata/init.py”, line 1037, in
eps = itertools.chain.from_iterable(
^
File “/usr/lib/python3.11/importlib/metadata/_itertools.py”, line 16, in unique_everseen
k = key(element)
^^^^^^^^^^^^
File “/usr/lib/python3.11/importlib/metadata/init.py”, line 954, in _normalized_name
or super().normalized_name
^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/importlib/metadata/init.py”, line 627, in normalized_name
return Prepared.normalize(self.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/importlib/metadata/init.py”, line 882, in normalize
return re.sub(r"[-
.]+", “-”, name).lower().replace(‘-’, '
')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/re/init.py”, line 185, in sub
return _compile(pattern, flags).sub(repl, string, count)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got ‘NoneType’

What system are you currently using, and what is the version of the system?
Yes, we suggest that you reinstall the Raspberry Pi OS and then reinstall all the library code.
Remember, do not change the character encoding of the system; it must use the standard encoding (UTF-8).

Not sure exactly what details you need, but I collected what is below which I think is probably what you’re looking for. If not let me know what other details may be needed.

As far as the character encoding is concerned no changes were made to it. All the directions for the kit were followed exactly as prescribed.

Thanks for the help thus far!

Note I blanked out the links from the os-release output due to the forum software complaining this message had too many links in it.

user@pibot:/etc $ cat /sys/firmware/devicetree/base/model; echo
Raspberry Pi 3 Model B Plus Rev 1.4
user@pibot:/etc $ cat /etc/os-release
PRETTY_NAME=“Debian GNU/Linux 12 (bookworm)”
NAME=“Debian GNU/Linux”
VERSION_ID=“12”
VERSION=“12 (bookworm)”
VERSION_CODENAME=bookworm
ID=debian
HOME_URL=“”
SUPPORT_URL=“”
BUG_REPORT_URL=“”
user@pibot:/etc $ uname -a
Linux piebot 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux
user@pibot:/etc $

Please reinstall the Raspberry Pi operating system and then download and install all the necessary libraries for PiCar-X. Share screenshots of the installation process with us so that we can assist you in analyzing and resolving the issue.

You can refer to the installation instructions here:5. Install All the Modules(Important) — SunFounder PiCar-X Kit documentation