Skip to content
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

Error at launch #3

Open
Cotel opened this issue Jun 12, 2015 · 4 comments
Open

Error at launch #3

Cotel opened this issue Jun 12, 2015 · 4 comments

Comments

@Cotel
Copy link

Cotel commented Jun 12, 2015

Installation seems to be okay, but i get this when i start the bot:

Telegram-cli version 1.3.1, Copyright (C) 2013-2015 Vitaly Valtman
Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type `show_license'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show_license' for details.
Telegram-cli uses libtgl version 2.0.2
Telegram-cli uses libpython version 2.7.3
I: config dir=[/home/pi/.telegram-cli]
 *** Failed to load python script
Traceback (most recent call last):
  File "bot/bot.py", line 10, in <module>
    from gl import utils
  File "/home/pi/Telegram/pybotgram/gl/utils.py", line 10, in <module>
    import requests
ImportError: No module named requests
@rockneurotiko
Copy link
Owner

Seems that you don't have python 3 and/or the python 3 libraries, did you followed all the instructions?
Do this and give me the output:

$ source env/bin/activate
$ python
>>> import sys
>>> print(sys.version)
>>> import requests

😄

@Cotel
Copy link
Author

Cotel commented Jun 12, 2015

Im trying to host it on my Raspberry Pi. If I do what you said it gives me this:

pi@raspberrypi ~/Telegram/pybotgram $ source env/bin/activate
(env)pi@raspberrypi ~/Telegram/pybotgram $ python
Python 3.4.3 (default, Jun 12 2015, 08:02:03)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.version)
3.4.3 (default, Jun 12 2015, 08:02:03)
[GCC 4.6.3]
>>> import requests
>>>

I had to download and compile Python 3.4 because Raspbian brings Python 3.2 and doesn't upgrade from repositories. I followed this guide for it. It recommends to use a virtualenv for Python 3.4 and I installed the bot inside it because I couldn't install it otherwise, it says I don't have Python 3 installed.

@rockneurotiko
Copy link
Owner

Yeah, actually the ./launch.sh install install a python3.4 virtualenv and runs everything with it (it's in the env directory).
Try to remove tg and install again, now it should work, let me know if it doesn't and we'll look it :S

@Cotel
Copy link
Author

Cotel commented Jun 12, 2015

If I try to launch the installation without any virtualenv it gives me this:

pi@raspberrypi ~/Telegram/pybotgram $ ./launch.sh install
./launch.sh: línea 60: python3.4: no se encontró la orden
You need to install the python 3 libs, in ubuntu: 'sudo apt-get install python3-dev'

And that's why I had to download and compile Python 3 manually, because python3-dev says it is in its last version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants