New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem after clean install #12
Comments
Today I've done a clean install with raspbian stretch instead of the new Buster. I've tried switcing to Python 3.7 (systemwide), which results in a failed status as well, but with slightly different errors. |
dtm.timezone no longer exists it seems ...
perhaps pip3 on buster instead of pip ? I see in the telegram code
expecting to have timezone is this line: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/utils/helpers.py#L82 This seems to contain how to fix: https://github.com/python-telegram-bot/python-telegram-bot/pull/1506/files/cc40d63a8ca2e51f71e690fe491cb9d4d31a06d4 So, if not using 3.3+ you need an older version of python-telegram-bot, but this might not work with current telegram api. Otherwise, use python 3.7, and let's fix the errors due to that. Seems the best way forward. Post python 3.7 error in new bug thread |
Is this fixed #7 with merged? |
Yep! #7 fixed this. |
Did a clean install, updated Python (3.7) and followed all the steps from the manual (with the new files on this github). Got the same error. Do I have to change some lines of code myself or should this be fixed? |
Did you check which Python is being used (systemwide)? After a python install, it is not necessary being used... |
When I type the command So then i recalled the tutorial that I followed told me to go in the bashrc file and type alias python3 = 3.7 instead of python = 3.7 After reboot ran the commands
And... same attributeError: 'module' has no attribute 'timezone' |
Hi Sn1ckerson, Sorry it took a while to get back to you. What happens if you manually run FK_ChatBot.py by running the following code from the terminal:
Furthermore, which bashrc file did you modify? By addingthat alias to the Regards, |
Hi Erwin Thank you for the reply. I did add the alias to the first one so I did the following:
Next I added the alias using code: In another thread you asked me what it said when I type
Now I really want it to get it to work, just out of pure stubbornness. Kind regards |
Hi Nick, I have reasons to believe you're almost there! You installed the python telegram API previously, but only for python 2.7, as that was your default python version at that time. Since modules for python2 do not get recognized by python 3, you have to install that module again. That is also what the error is saying: python doesn't know what you mean with 'telegram'. Now that you are on python3 system wide, you can run the following (taken from the installation manual): sudo pip install python-telegram-bot --upgrade sudo pip install pexpect --upgrade This will install the required modules for python3. After you've did this, you should be able to run the FK_Chatbox.py without rebooting. If you don't get an error, you can reboot, and the service should be running. If it does give an error, you can post that output here ;-) Kind regards, |
As @ErwinP says. |
Using pip gave me a bunch of "Requirements already satisfied" text. |
Did some more digging, When I open the FK_ChatBot.py file it says Python 3.7.3 (/usr/bin/python3) in the "shell" box on the bottom.
Starting to think I made it too messy and should just do a clean install again.. I did a clean install from the rasberrypi website a couple of weeks ago yet it still had python 2.7 on it? Where do I get the one that has 3.7 already in it? |
python 3.7 is always in now. python 2 is end of life
Then if I never did changes in the my bashrc for that, as that seems like something that would be for one user only, and part of familiekiosk is launched at startup, not as that user. For telegram, pip3 install should work, but probably there is a package in debian now: https://ubuntu.pkgs.org/20.04/ubuntu-universe-i386/python3-python-telegram-bot_12.4.2-1_all.deb.html
instead of the pip3 install of the bot api. Note that pip3 packages sometimes start with python3 instead of with python, for the python 3 version. It's on my todo to test and update the manual, sorry. |
Ok did a clean install again and I see, there's a python and a python3? |
Ladies and gentlemen, we got'em! Jun 16 20:00:10 raspberrypi systemd[1]: Started Telegram Family Chat Bot. |
May I suggest adding the following to the manual (before step 1 Beeldverwerking): I guess it must be common sense to experienced raspberrypi users but this helped me out. |
New problem..: Jun 16 20:08:06 raspberrypi systemd[1]: Started Family Kiosk System. |
ok, updated manual. |
Running it now gives the fellowing error: FK_TVbox.py:167: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: https://wiki.gnome.org/PyGObject/Threading Detected the first boot
Running the systemctl status fk_tvbox.service command returns: Jun 20 13:23:31 raspberrypi systemd[1]: Started Family Kiosk System. |
You need to indeed rename config.py.in to config.py, and open it, setting the configuration options as you want them. Like your channel and token acces to Telegram: The systemctl still says: No valid config file found, so set that first. |
Hi, sorry it took a while. Tried to rush things, SD-card got broken (3d-printed box was too small..)
|
Bump! Edit: |
Boot sequence order changing over different releases is unfortunately a common problem. |
Hi all,
Just did a clean install of raspbian-buster on a Raspberry Pi 3 A+
I have done 2 installs on older raspbian images, both on Pi 3 B without issues, so this is new to me. Any suggestions?
Best regards,
Jan
The text was updated successfully, but these errors were encountered: