Andymann / Tizonia-RPI3

https://andyland.info/wordpress/?p=7657
2 stars 0 forks source link

Unable to init server #1

Open audionomio opened 3 years ago

audionomio commented 3 years ago

Hi Andy, ein großartiges Projekt! Ich versuche gerade zu verstehen, welcher Server hier gemeint ist mit "Unable to init server". Kannst Du vielleicht helfen? Im Moment versuche ich, Dein Script unverändert per 'python3 tizonia.py' zu starten. Zuvor habe ich erfolgreich Tizonia per CLI zum Laufen gebracht mit z.B. 'tizonia -s --spotify-playlist-id '1637RaILsy2CvRyg9yOSoK'

Die Meckereien über fehlende Dependencies habe ich scheinbar alle beseitigt.

Der Console-Output aus Deinem Skript sieht so aus:

` pygame 2.0.1 (SDL 2.0.9, Python 3.7.3) Hello from the pygame community. https://www.pygame.org/contribute.html Playlist IDs: XML ist gross genug Fidi und Bumsi 37i9dQZF1DX11WWTNSp4Dq Shy-FX 0oUXKipJxVQQGPnf67l1V7 Martin 4mMU4nZKOWxFf7ZURv6hws Andy 7COJCITGOFDe6AOojNY5es Einhorn 2JOsWhMtXZIb6E1qWAa3ry Autostart. picking random playlist:4 starting Fahrstuhlmusik Starting with Playlist 2JOsWhMtXZIb6E1qWAa3ry 0 Tizonia started... Unable to init server: Could not connect: Connection refused

(lxterminal:793): Gtk-WARNING **: 11:20:57.638: cannot open display: isRunning: False Interval query: Tizonia not running picking random playlist:3 starting Fahrstuhlmusik Starting with Playlist 7COJCITGOFDe6AOojNY5es 0 Tizonia started... Unable to init server: Could not connect: Connection refused

(lxterminal:797): Gtk-WARNING **: 11:21:04.813: cannot open display: ^CTraceback (most recent call last): File "tizonia.py", line 244, in time.sleep(.1) KeyboardInterrupt `

Gute neues Jahr! Mathis

audionomio commented 3 years ago

So it's the X11 server I found out ...

Noch nicht am Ziel, aber einen Schritt weiter.

audionomio commented 3 years ago

Ich bekomme jetzt das Terminal Fenster am Windows Rechner angezeigt, über den ich per Putty/ssh auf den headless Pi zugreife. Darin sehe ich nun, dass Spotify spielt, aber das spricht sich irgendwie nicht rum, und zu hören ist weiterhin nur die Fahrstuhlmusik.

Die Console meldet:

Starting with Playlist 0oUXKipJxVQQGPnf67l1V7 0 Tizonia started... isRunning: True Exception while querying Tizonia instance: isRunning: True Exception while querying Tizonia instance: isRunning: True Exception while querying Tizonia instance: isRunning: True Exception while querying Tizonia instance:

etc.

Wäre super, wenn du mir helfen kannst! (wie Du bereits in der email dankenswerterweise angekündigt hast)

Andymann commented 3 years ago

Switching to English here (since the originating post is also in English language): I updated the missing pieces of information on the website: https://andyland.info/wordpress/?p=7657 . Things should be clearer now.

In short: It's necessary to boot into a complete X environment (set this in raspi-config) and to run Tizonia in a dedicated lxterminal. Otherwise things will quickly become sketchy: DBus interface not working correctly, high CPU load, etc. If you want to run the RPI without a dedicated monitor you need to add the line

export DISPLAY=":0"

at the end of the file '.bashrc' in the user's home directory.