may-cat / firefly-iii-telegram-bot

GNU General Public License v3.0
27 stars 5 forks source link

what should be on data.json? #8

Open revi opened 4 years ago

revi commented 4 years ago

I've

  1. git clone https://github.com/may-cat/firefly-iii-telegram-bot
  2. installed python3-pip from debian archive
  3. installed requirements
  4. got the API key from botfather@telegram
  5. put it in config.json
  6. and finally ran python3 bot.py

and what I got was...

$ python3 bot.py 
Traceback (most recent call last):
  File "bot.py", line 91, in <module>
    users=users.User()
  File "/home/revi/firefly-iii-telegram-bot/users.py", line 24, in __init__
    content_file = open(self._filename, 'r')
FileNotFoundError: [Errno 2] No such file or directory: 'data.json'

Checking for data file displayed...

$ ls | grep data
data.json.example
$

but I have no idea what should be the value for the data.json. I think this should be on how-to setup page. Can you document it? Thanks!


FYI: python version/pip3 install -r requirements.txt


Python 3.7.3 (default, Apr 3 2019, 05:39:12) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
$ pip3 install -r requirements.txt
Requirement already satisfied: schedule==0.5.0 in /home/revi/.local/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (0.5.0)
Requirement already satisfied: oauth2==1.9.0.post1 in /home/revi/.local/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (1.9.0.post1)
Requirement already satisfied: requests==2.9.1 in /home/revi/.local/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (2.9.1)
Requirement already satisfied: pyTelegramBotAPI==3.6.6 in /home/revi/.local/lib/python3.7/site-packages (from -r requirements.txt (line 4)) (3.6.6)
Requirement already satisfied: httplib2 in /usr/lib/python3/dist-packages (from oauth2==1.9.0.post1->-r requirements.txt (line 2)) (0.11.3)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from pyTelegramBotAPI==3.6.6->-r requirements.txt (line 4)) (1.12.0)
$ ```
tonkoshkurik commented 4 years ago

I just copied cp data.json.example data.json and it's working. This file became filled by program when I connected my firefly-iii with created telegram bot