genebean / PiWeatherRock

Displays local weather on a Raspberry Pi

Home Page:https://piweatherrock.technicalissues.us

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No suitable video driver found!

meahdi opened this issue · comments

Hi
I try to test this code but have this error
any one can help me?

(
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Driver: x11 failed.
Driver: fbcon failed.
Driver: directfb failed.
Driver: svgalib failed.
Traceback (most recent call last):
File "weather.py", line 726, in
my_disp = my_display()
File "weather.py", line 158, in init
raise Exception('No suitable video driver found!')
Exception: No suitable video driver found!
)

How are you running it? What OS are you on?

How are you running it? What OS are you on?

I have the same issue with this.

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux

I've figured out now. I ran "python weather.py" in command line mode, so it will show the error msg. If I ran it in the Desktop mode. It works!!

@holson-zhong is there something I could change about the documentation to help? Also, what exactly do you mean by desktop mode?

Sent with GitHawk

This should work without a GUI just fine. It can utilize a frame buffer to display the graphical bits. It’s intended to work with any of these drivers:

drivers = ['x11', 'fbcon', 'directfb', 'svgalib']

I just pulled out an old Pi I had in storage so I’ll double check this is all working as expected and then comment back.

I just did a fresh install of Rasbian 10 Lite with the following steps and everything worked:

  1. ran raspi-config
  2. installed git, vim, & python3-pip
  3. cloned this repo
  4. created my config file with vim
  5. ran the apt-get install command from the readme
  6. ran pip3 install -r requirements.txt
  7. ran python3 weather.py

I suspect the no driver found issue was because you were not running it from the local tty (tty1). Feel free to reopen if you have more info you'd like me to look into