Comments (8)
Hello,
I tried to test it out but I didn't get a "Bad credentials" response.
Do you think it could be from a failed login attempt? It can sometimes be hard to see what password you're typing on the command line since there's no indicator.
https://developer.github.com/v3/#failed-login-limit
from github-traffic-stats.
It was my environment's problem..whether it's incomplete install of requests or python 2/3.
I tried a clean VM, and your script worked very well.
Sorry for taking your time, I ignored basic things!
from github-traffic-stats.
Sorry for asking another question:
Is this error due to non-ascii path?
Traceback (most recent call last):
File "github-traffic-stats.py", line 277, in
main(args.username, args.repo, args.save_csv)
File "github-traffic-stats.py", line 267, in main
store_csv(csv_file_name, repo, traffic_response, 'views')
File "github-traffic-stats.py", line 206, in store_csv
with open(file_path, 'a') as csvfile:
IOError: [Errno 2] No such file or directory: '/home/a29988122/\xe6\xa1\x8c\xe9\x9d\xa2/github-traffic-stats/data/2017-09-13-01h-09m-traffic-stats.csv'
EDIT: I changed desktop path name, and it's like this:
Traceback (most recent call last):
File "github-traffic-stats.py", line 277, in
main(args.username, args.repo, args.save_csv)
File "github-traffic-stats.py", line 267, in main
store_csv(csv_file_name, repo, traffic_response, 'views')
File "github-traffic-stats.py", line 206, in store_csv
with open(file_path, 'a') as csvfile:
IOError: [Errno 2] No such file or directory: '/home/a29988122/Desktop/github-traffic-stats/data/2017-09-13-01h-29m-traffic-stats.csv'
Sorry I'm a noob on this...it might seem easy to you, but I sucked : (
from github-traffic-stats.
No worries!! Everyone is learning something new :)
Could you tell me what directory you are running the script from and also what are you typing on the command line?:
- Example:
From the directory "/my/directory":
$ python github-traffic-stats.py '29988122' 'ALL' 'save_csv'
from github-traffic-stats.
Thank you!
It was under ~/Desktop/github-traffic-stats/python
(or should I write /home/a29988122/Desktop/github-traffic-stats/python ?)
And I executed:
sudo python github-traffic-stats.py '29988122' 'Fate-Grand-Order_Lua' 'save_csv'
The results are the same with or without sudo.
Python 2.7 I guess, linux mint 18.2
Fresh new install.
Password:
> Fate-Grand-Order_Lua - Visitors
Date Views Unique visitors
Totals 1026 149
2017-08-29 1 1
2017-08-30 99 19
2017-08-31 33 15
2017-09-01 67 17
2017-09-02 55 13
2017-09-03 23 9
2017-09-04 44 9
2017-09-05 29 10
2017-09-06 54 7
2017-09-07 65 12
2017-09-08 65 11
2017-09-09 31 11
2017-09-10 246 58
2017-09-11 165 22
2017-09-12 49 13
> Fate-Grand-Order_Lua - Git clones
Date Clones Unique cloners
Totals 4 4
2017-09-01 2 2
2017-09-02 2 2
> Fate-Grand-Order_Lua - Referring sites
Date Views Unique visitors
Totals 327 64
github.c... 248 38
ptt.cc 56 14
Google 13 5
ankulua-... 4 3
translat... 3 2
l.facebo... 2 1
medium.c... 1 1
Traceback (most recent call last):
File "github-traffic-stats.py", line 277, in <module>
main(args.username, args.repo, args.save_csv)
File "github-traffic-stats.py", line 267, in main
store_csv(csv_file_name, repo, traffic_response, 'views')
File "github-traffic-stats.py", line 206, in store_csv
with open(file_path, 'a') as csvfile:
IOError: [Errno 2] No such file or directory: '/home/a29988122/Desktop/github-traffic-stats/data/2017-09-13-01h-30m-traffic-stats.csv'
from github-traffic-stats.
Okay, I could replicate it. If I copied just the "github-traffic-stats.py" script into a completely new folder and ran it I got the same error.
Try to make sure that a directory like "/home/a29988122/Desktop/github-traffic-stats/data/" exists.
Or to explain what the code does now, if your current directory is "/home/user/my/folder/" and the script is at "/home/user/my/folder/github-traffic-stats.py" then try to make sure there is a "/home/user/my/folder/data/" directory. The script tries to save the CSV with that logic.
from github-traffic-stats.
Okay, it's due to the fact that I directly cloned your repo, and there's no /data folder in it, only sample-data. The problem's exactly as you said, solved after I manually created /data folder!
Thank you for your work, it helped a lot.
(now I can brag about visitor count on my resume.. XD )
from github-traffic-stats.
Great! Glad it worked out =)
from github-traffic-stats.
Related Issues (18)
- bad credentials error - with only traffic permission HOT 6
- enhancement: also track clones and referrers HOT 3
- enhancement: export to sql HOT 4
- Limit on repos for an org? Or bug? HOT 4
- password from a pipe or a non-terminal HOT 3
- SSL Error HOT 2
- How about adding "Popular content" HOT 2
- re: Bad Credentials HOT 1
- Detail HOT 2
- ID/PW auth will be depecrated the end of this year HOT 1
- Minimal token permissions necessary? HOT 1
- fatal: not a git repository HOT 1
- relation "repo_overview" does not exist
- What license are these codes released under?
- Add ability in gts to write to a specific folder
- How to not display repo with 0 view/clone
- "must have push access to repository" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github-traffic-stats.