woolweaver / tweetstats Goto Github PK
View Code? Open in Web Editor NEWThis project forked from darthkeizer/pi-hole-stats-tweeter
Send a a daily tweet with the results of what my @pi-hole blocked and other system stats.
This project forked from darthkeizer/pi-hole-stats-tweeter
Send a a daily tweet with the results of what my @pi-hole blocked and other system stats.
When i run the python 3 script i get the following error. Do you know how to fix?
~/tweetStats $ python3 tweetStats.py
0
Traceback (most recent call last):
File "tweetStats.py", line 40, in
main()
File "tweetStats.py", line 36, in main
tweet_it(ga(cfgt()))
File "/home/pi/tweetStats/lib/get_config.py", line 39, in get_cfgt
cfg = js.load(data)
File "/usr/lib/python3.7/json/init.py", line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 22 column 5 (char 895)
See attachment for the pythonscript trowing the error. Cant find out where it goes wrong, the [ ] and ( ) and all the comma's are used correctly. Please help
Hi there, its me again :). When a cronjob has to run multiple local scripts in Debian it cant find the rest of the file in Debian/Raspbian. I always have to make a bash script for it like the one below. If you are interested you can use it in your tweetStats ๐ .
Run: sudo crontab -e
Add the following line: 00 12 * * * sudo bash /home/pi/tweetStats/tweetStats.sh >> /home/pi/tweetStats/tweetStat/twitter_bot.txt 2>&1
#!/bin/bash
cd /home/pi/tweetStats
sudo python3 /home/pi/tweetStats/tweetStats.py
cd ~
Debug Variable = 0
tweetStats.py -h for more info
[{'code': 89, 'message': 'Invalid or expired token.'}]This your down fall
[{'code': 89, 'message': 'Invalid or expired token.'}]This your down fall
Traceback (most recent call last):
File "/home/pi/Desktop/tweetStats/tweetStats.py", line 46, in
main()
File "/home/pi/Desktop/tweetStats/tweetStats.py", line 42, in main
tweet_it(ga(cfgt()))
File "/home/pi/Desktop/tweetStats/tweetStats.py", line 14, in tweet_it
print(ga(cfgt())[3])
TypeError: 'NoneType' object is not subscriptable
I think its a typo somewhere. Will look more into it after work :)!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.