waka-readme-stats icon indicating copy to clipboard operation
waka-readme-stats copied to clipboard

BUG: Exception Occurred No objects to concatenate:

Open sunnydanu opened this issue 3 years ago • 27 comments

Describe the bug Failed to update readme with exception " Exception Occurred No objects to concatenate

To Reproduce Steps to reproduce the behavior:

  1. Go to update_state.yml
  2. don't set SHOW_LOC_CHART [which is true by default]
  3. run workflow
  4. See error

image

Expected behavior should be update readme

Github repository link https://github.com/sunnydanu/sunnydanu

Additional context But if I set flag to false SHOW_LOC_CHART . everything works fine.

detail logs

logs_52.zip

sunnydanu avatar Mar 09 '21 14:03 sunnydanu

@sunnydanu Can you provide the link to your failed action run?

aravindvnair99 avatar Mar 10 '21 22:03 aravindvnair99

@sunnydanu Can you provide the link to your failed action run? Hi, @aravindvnair99 here is the link ,

And it's show 0 line of code. even when run is success [with SHOW_LOC_CHART = false ] .

Thanks

sunnydanu avatar Mar 11 '21 00:03 sunnydanu

@sunnydanu Can you provide the link to your failed action run? Hi, @anmol098 here is the link ,

And it's show 0 line of code. even when run is success [with SHOW_LOC_CHART = false ] .

Thanks

Hey @sunnydanu ! I'm not @anmol098... But anyways, can you retry because for me it works without specifying SHOW_LOC_CHART.

aravindvnair99 avatar Mar 11 '21 08:03 aravindvnair99

@sunnydanu Can you provide the link to your failed action run? Hi, @anmol098 here is the link ,

And it's show 0 line of code. even when run is success [with SHOW_LOC_CHART = false ] . Thanks

Hey @sunnydanu ! I'm not @anmol098... But anyways, can you retry because for me it works without specifying SHOW_LOC_CHART.

sunnydanu avatar Mar 11 '21 12:03 sunnydanu

Hey @aravindvnair99 sorry my bad.. about workflow still not working. Do i need premium plan at waka ? . My waka dashboard has all the changes but not updating readme . Still showing. 0 line of code . And that exceptional is still here

sunnydanu avatar Mar 11 '21 13:03 sunnydanu

my waka dashboard image

sunnydanu avatar Mar 11 '21 15:03 sunnydanu

Hey @aravindvnair99 sorry my bad.. about workflow still not working. Do i need premium plan at waka ? . My waka dashboard has all the changes but not updating readme . Still showing. 0 line of code . And that exceptional is still here

@sunnydanu No, you don't need a premium account. The free one will do. Have you added the Wakatime API key to your repo?

Like this:

image

aravindvnair99 avatar Mar 11 '21 15:03 aravindvnair99

my waka dashboard

@sunnydanu Can you share a screenshot of https://github.com/sunnydanu/sunnydanu/settings/secrets/actions?

aravindvnair99 avatar Mar 11 '21 15:03 aravindvnair99

my waka dashboard

@sunnydanu Can you share a screenshot of https://github.com/sunnydanu/sunnydanu/settings/secrets/actions?

image

sunnydanu avatar Mar 11 '21 16:03 sunnydanu

my waka dashboard

@sunnydanu Can you share a screenshot of https://github.com/sunnydanu/sunnydanu/settings/secrets/actions?

@sunnydanu you sure you have entered your API key correctly? Can you re-enter and check if the issue still exists?

aravindvnair99 avatar Mar 11 '21 16:03 aravindvnair99

@aravindvnair99 updated. still having same issue.

sunnydanu avatar Mar 11 '21 16:03 sunnydanu

@aravindvnair99 updated. still having same issue.

@sunnydanu Go to https://github.com/settings/tokens, select the token you made and attach the screenshot here of what options are ticked there.

aravindvnair99 avatar Mar 11 '21 20:03 aravindvnair99

@aravindvnair99 image

sunnydanu avatar Mar 11 '21 23:03 sunnydanu

is anyone looking this ..? I really need to keep this work .

sunnydanu avatar Mar 12 '21 16:03 sunnydanu

Hey @aravindvnair99 I found a reason . behind this unexpected behavior . the reason was I don't have any public repo over here which I owned [recently removed last one]. so as I push one public repo. it worked and that's it.

But still it's should not break the flow. rather then skip ..

Thanks

sunnydanu avatar Mar 12 '21 17:03 sunnydanu

Hey @aravindvnair99 I found a reason . behind this unexpected behavior . the reason was I don't have any public repo over here which I owned [recently removed last one]. so as I push one public repo. it worked and that's it.

But still it's should not break the flow. rather then skip ..

Thanks

@sunnydanu Ah nice catch! But that's not the reason. You do have public repositories. It didn't work because the languages used couldn't be identified. The only public repository you had contributed to was https://github.com/sunnydanu/sunnydanu which is just text files. Whereas when you added some JavaScript code, it started working:

image

@anmol098 We have a confirmed bug here although only those with code should use the stats. xP

aravindvnair99 avatar Mar 13 '21 17:03 aravindvnair99

@anmol098 ahh. Now things getting clear to me. I had few public repos earlier when I first use waka-state so it worked. after that I deleted my repos. and got stucked.... LOL took me while to figure out .. So I post it here. Thanks for your updates though I have one question. my line of code is show 3. But my nodejs-demo has more then 3 words. https://github.com/sunnydanu/nodejs-demo/commits/master

how dose it count ?

thanks

sunnydanu avatar Mar 14 '21 05:03 sunnydanu

@anmol098 ahh. Now things getting clear to me. I had few public repos earlier when I first use waka-state so it worked. after that I deleted my repos. and got stucked.... LOL took me while to figure out .. So I post it here. Thanks for your updates though I have one question. my line of code is show 3. But my nodejs-demo has more then 3 words. https://github.com/sunnydanu/nodejs-demo/commits/master

how dose it count ?

thanks

@sunnydanu Refer these:

  • https://github.com/anmol098/waka-readme-stats/blob/fda9fd3bb5626c4ac4632fd23a1d5349f67ff500/main.py#L438-L441
  • https://github.com/anmol098/waka-readme-stats/blob/fda9fd3bb5626c4ac4632fd23a1d5349f67ff500/main.py#L385-L390
  • https://github.com/anmol098/waka-readme-stats/blob/fda9fd3bb5626c4ac4632fd23a1d5349f67ff500/loc.py#L1-L106

aravindvnair99 avatar Mar 14 '21 19:03 aravindvnair99

Hi @aravindvnair99 my profile status are not updating. can you help me with that. it's in waka dashboard but not updating my readme file. line of code. anything.

sunnydanu avatar Mar 31 '21 01:03 sunnydanu

Hi @aravindvnair99 my profile status are not updating. can you help me with that. it's in waka dashboard but not updating my readme file. line of code. anything.

@sunnydanu Delete this: https://github.com/sunnydanu/sunnydanu/blob/master/charts/bar_graph.png and run the workflow. See what happens.

aravindvnair99 avatar Mar 31 '21 07:03 aravindvnair99

Hello, I am having the exact same problem:

Traceback (most recent call last): Username Dieman89 File "/main.py", line 502, in <module> Exception Occurred 'NoneType' object is not subscriptable waka_stats = get_stats(g) File "/main.py", line 450, in get_stats stats += get_waka_time_stats() File "/main.py", line 305, in get_waka_time_stats stats = stats + generate_commit_list(tz=data['data']['timezone']) + '\n\n' File "/main.py", line 196, in generate_commit_list repos = [d for d in nodes if d['isFork'] is False] File "/main.py", line 196, in <listcomp> repos = [d for d in nodes if d['isFork'] is False] TypeError: 'NoneType' object is not subscriptable

Dieman89 avatar Apr 15 '21 23:04 Dieman89

Hello, I am having the exact same problem:

Traceback (most recent call last): Username Dieman89 File "/main.py", line 502, in <module> Exception Occurred 'NoneType' object is not subscriptable waka_stats = get_stats(g) File "/main.py", line 450, in get_stats stats += get_waka_time_stats() File "/main.py", line 305, in get_waka_time_stats stats = stats + generate_commit_list(tz=data['data']['timezone']) + '\n\n' File "/main.py", line 196, in generate_commit_list repos = [d for d in nodes if d['isFork'] is False] File "/main.py", line 196, in <listcomp> repos = [d for d in nodes if d['isFork'] is False] TypeError: 'NoneType' object is not subscriptable

@Dieman89 Did you give correct access for the GitHub token?

aravindvnair99 avatar Apr 16 '21 06:04 aravindvnair99

Yea, repo and user. > > Hello, I am having the exact same problem:

Traceback (most recent call last): Username Dieman89 File "/main.py", line 502, in <module> Exception Occurred 'NoneType' object is not subscriptable waka_stats = get_stats(g) File "/main.py", line 450, in get_stats stats += get_waka_time_stats() File "/main.py", line 305, in get_waka_time_stats stats = stats + generate_commit_list(tz=data['data']['timezone']) + '\n\n' File "/main.py", line 196, in generate_commit_list repos = [d for d in nodes if d['isFork'] is False] File "/main.py", line 196, in <listcomp> repos = [d for d in nodes if d['isFork'] is False] TypeError: 'NoneType' object is not subscriptable

@Dieman89 Did you give correct access for the GitHub token?

Dieman89 avatar Apr 16 '21 08:04 Dieman89

Yea, repo and user.

@Dieman89 I've sent you a PR. Merge and check if that helps.

aravindvnair99 avatar Apr 16 '21 08:04 aravindvnair99

Yea, repo and user.

@Dieman89 I've sent you a PR. Merge and check if that helps.

Same error:

Username Dieman89 Traceback (most recent call last): File "/main.py", line 502, in <module> Exception Occurred 'NoneType' object is not subscriptable waka_stats = get_stats(g) File "/main.py", line 450, in get_stats stats += get_waka_time_stats() File "/main.py", line 305, in get_waka_time_stats stats = stats + generate_commit_list(tz=data['data']['timezone']) + '\n\n' File "/main.py", line 196, in generate_commit_list repos = [d for d in nodes if d['isFork'] is False] File "/main.py", line 196, in <listcomp> repos = [d for d in nodes if d['isFork'] is False] TypeError: 'NoneType' object is not subscriptable

Dieman89 avatar Apr 16 '21 08:04 Dieman89

@aravindvnair99 any idea?

Dieman89 avatar Apr 16 '21 18:04 Dieman89

any fix.?? still line of code is stuck on 3. :-/

sunnydanu avatar May 03 '21 09:05 sunnydanu

Recently I've updated the project's codebase, now it should work in general cases. I'm closing the issue right now because it's pointing to the outdated code. @Dieman89, @sunnydanu, feel free to open another one if something's still not working in your cases!

pseusys avatar Feb 28 '23 23:02 pseusys