LoveBootCaptain / WeatherPi_TFT

a weather display for a raspberry pi and a TFT display written in python3 and pygame
Other
80 stars 24 forks source link

The file '/lib/lsb/init-functions' does not exist. #2

Closed drlovelove closed 7 years ago

drlovelove commented 7 years ago

hello, I am new to python and I am interested in your project, but I am facing following errors : The file '/lib/lsb/init-functions' does not exist. python error I don't know what's the problem. By the way, I am currently living and working in china and I don't have language issue.

LoveBootCaptain commented 7 years ago

Just remove that one line... shouldn't make any problems. regards and thanks for trying it out

drlovelove commented 7 years ago

Hi, thanks for your quick reply, as noobs I really know a little about python. out of curiosity and based on your well-documented projected I am trying to build this, think it's a little gift to myself. here is something I am facing with my Pycharm Edu... its showing multiple errors like , pygame and requests module can't be found. But I have installed python 2.7 on my system as well as pygame. i have tried these two commands ( pip install pygame & pip install requests) to make sure everything is in place. As per screen shot here you can see its asking me for python 2.6!!! was it build based on python 2.6? am I missing something here ? pygame errors

I know it may or may not the problem with the codes but I am here seeking help from a person who is a developer and much wiser than me, a little help will be appreciated . thanks again

LoveBootCaptain commented 7 years ago

This should be fixed if you are switching to python3.

WeatherPi_TFT is written in python3 and it requires pyhon3 modules like pygame for python3.

Just follow those steps in the toutorial for switching to python3 on the raspberry.

To switch your OS (windows or OS X) just install python3 from the official source and switch the interpreter in your PyCharm Edu (Preferences -> Project Interpreter -> choose Python3.

Than update your modules on your computer with "pip3 install ..."

To start the app via terminal you have to use "python3 script.py" but if you set up PyCharm correctly with the right interpreter it should do that for you.

Hope this helps

drlovelove commented 7 years ago

Thanks for your help, I was confused about the version i was using. But there are lots of typo errors in your code , no matter what editor i use it always gives me typo errors and never runs the pygame. after hours of trying i finally figured that Line 226 should be replaced with config_data = open(PATH + 'example.config.json').read() dont know why. perhaps you named config.json file as example.config.json. by the way I don't need locale .even though I work in china but I use English system in my mac and pc . If anyone need to change the language I believe they should change the locale settings in their computer first.

right now i just need to figure out how to change "Regen" in English . working

LoveBootCaptain commented 7 years ago

RTFM ;)

It is explained why there is an example.config.json which you have to "cp" to config.json...

I don't want to share my credentials for the API so my config.json file is not part of the project.

That's no typing error... That's standard

Don't tell me you read my "well documented project" ;)

regards

drlovelove commented 7 years ago

"es tut mir leid, ich wollte nicht ihre gefรผhle verletzen." if my translation is correct. I have read your "well documented project". I am just new to python programming. By "typo" error I didn't mean typing error. Python editors were showing me those problems. I surely admit that I have lack of knowledge in programming. Thanks for a great project and keep it up.

LoveBootCaptain commented 7 years ago

dont't get me wrong... i was just a little bit joking (with too much sarcasm, i guess ๐Ÿ˜„ )

RTFM is more a joke than a harsh word ๐Ÿ˜„

you get through all this? that was your first achievement in becoming a python coder! great! you see, python is powerfull and mostly platform compatible. here and there a little bit rough ๐Ÿ˜„ on the edges.

i wrote this on a mac and it is ment for a raspberry pi. if it runs in windows that's awesome too.

the first issue you created this issue for is not relevant for running this in windows. the .sh-script is a template for a linux service which can start the app on the raspberry pi when it is booting and is ending it when you shutdown the pi. this is very usefull if you have just a pi connected to a display like in my project. no buttons, no keyboard.

all the other issues you run thru are basicly configuration issues but they are all in the little wiki described.

i hope this will inspire you to change it for your needs... mostly some translations you have to fix, cause i was lazy and hardcoded some stuff ๐Ÿ˜„

kind regards from berlin

drlovelove commented 7 years ago

I understood, and it was my first project on python. But I've no problem dealing with raspberry pi. Thanks to you , I've learned a lot from you. I'll go to freiburg to work soon , I hope those swift German words gonna be helpful too . Happy new year from china and best of luck .