r-cute / rcute-cozmars-server

firmware for Cozmars robot
45 stars 19 forks source link

Unable to install #16

Closed jimmyeao closed 3 years ago

jimmyeao commented 3 years ago

Couple of errors in the readme.md first line of install sudo apt install libtiff5 ibopenjp2-7 libportaudio2 python3-cffi is missing an "l" and should read sudo apt install libtiff5 libopenjp2-7 libportaudio2 python3-cffi

2nd line gives the following: (possibly missing some pre-requisites?)

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting rcute-cozmars-server==1.*
  Downloading https://files.pythonhosted.org/packages/4c/ee/0383bbee5d8b225ffde65b6fb3b49143dfec3dbd6a1d647272d9b2e865e5/rcute-cozmars-server-1.1.4.tar.gz (411kB)
    100% |████████████████████████████████| 419kB 169kB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-XwW0GI/rcute-cozmars-server/setup.py", line 23
        long_description=f"#rcute-cozmars-server\n\n{description}",
                                                                 ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-XwW0GI/rcute-cozmars-server/
jimmyeao commented 3 years ago

update, got past the install issue by using pip3 instead of pip However, now the service does not start:

Failed to start Cozmars Sanic server
/usr/bin/python3: No module named rcute_cozmars_server
hyansuper commented 3 years ago

Yes, it should be 'libopenjp2-7". try running server from command line sudo python3 -m rcute_cozmars_server and see what's the error

No module named rcute_cozmars_server

I think it means rcute-cozmars-server is not installed successfully

jimmyeao commented 3 years ago
pi@raspberrypi:~ $ sudo python3 -m rcute_cozmars_server
/usr/bin/python3: No module named rcute_cozmars_server

Looks like it didnt get installed correctly

hyansuper commented 3 years ago

@jimmyeao Oh, maybe you should install with sudo, coz systemctl runs with sudo too: sudo python3 -m pip install rcute-cozmars-server I'll update readme

jimmyeao commented 3 years ago

Thats looking better thanks:

pi@raspberrypi:~ $ service cozmars status
● cozmars.service - Cozmars Sanic server
   Loaded: loaded (/etc/systemd/system/cozmars.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-12-09 12:25:15 GMT; 1s ago
 Main PID: 2404 (python3)
    Tasks: 1 (limit: 729)
   CGroup: /system.slice/cozmars.service
           └─2404 python3 -m rcute_cozmars_server

Dec 09 12:25:15 raspberrypi systemd[1]: Started Cozmars Sanic server.

Doesnt seem to be listening on any ports though, should it be?

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      502/sshd
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      622/sshd: pi@pts/0
tcp6       0      0 :::22                   :::*                    LISTEN      502/sshd
tcp6       0      0 ::1:6010                :::*                    LISTEN      622/sshd: pi@pts/0
hyansuper commented 3 years ago

can you visit http://[your rpi's ip]


we missed some steps, wait for my readme update

jimmyeao commented 3 years ago

I get connection refused. I'll wait for the updated readme, then re-do from scratch :) I am still waiting on some of the electronics to arrive - I do have the printed parts ready so the fun of assembly is yet to come :) Really looking forwards to getting this put together, its a great project!

hyansuper commented 3 years ago

I think it's because you don't connect the screen and servo driver yet, and server is unable to communicate with these i2c/spi devices on start up.


[Edit] Connection to any peripheral is no longer required to start server in v2

Carlo-Defilippis commented 3 years ago

@jimmyeao Sorry for the late reply but you can type "/usr/bin/env python3 -m rcute_cozmars_server" in the command line of your raspberry pi to get more details on why your device is not connecting. P.s. Great work @hyansuper ! I'm having so much fun with this project.