genebean / PiWeatherRock

Displays local weather on a Raspberry Pi
https://piweatherrock.technicalissues.us
MIT License
50 stars 23 forks source link

No suitable video driver found! #6

Closed meahdi closed 4 years ago

meahdi commented 5 years ago

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! )

genebean commented 5 years ago

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

holson-zhong commented 4 years ago

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

holson-zhong commented 4 years ago

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!!

genebean commented 4 years ago

@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

holson-zhong commented 4 years ago

Yes, it might be help when you change about the documentation, it should declare that this script CAN'T RUN IN COMMAND LINE.

Desktop mode is the meaning of GUI, when I run this script in my raspberry pi through the keyboard and mouse ( actually it was double clicked my mouse), it works. But when I run the script through the putty and command line, it shows the error message.

Haoxiang Zhong Mob:971-808-8465

Gene Liverman notifications@github.com 于2019年12月13日周五 上午4:27写道:

@holson-zhong https://github.com/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 http://githawk.com

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/genebean/PiWeatherRock/issues/6?email_source=notifications&email_token=AN3YOPT7XQXUQ5MLOOBHP3LQYN5TBA5CNFSM4HTTK6AKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGZ3AAA#issuecomment-565424128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN3YOPRGOD4RMJKTZ54BE5TQYN5TBANCNFSM4HTTK6AA .

genebean commented 4 years ago

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:

https://github.com/genebean/PiWeatherRock/blob/6352d6980f355b12bea6ee9165b90d7fc872b359/weather.py#L142

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.

genebean commented 4 years ago

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