Closed B4b4u closed 6 years ago
This happens when CoC server enters maintenance mode and basically stops working. You have to somehow restart it.
I have to yet think of a solution for this.
how should I perform that restart? restarting chashogram do not fix the isse
Every time that you run Clashogram, you are restarting it. It does not have any special meaning: the program dies and you run it again.
Also by restarting, I meant using some other means to automatically run Clashogram again when it dies. Such as using a systemd unit that automatically restarts when the unit dies.
You can also manually change this line and increase max_retries
to a larger number.
I will fix this problem in a newer release, for now you have to use one of the above suggestions.
thx for the support
I released a new version, it should solve your problem. I added a new --forever
flag. Start clashogram with --forever
and it will keep connecting even when the CoC server is down.
I did successfully install clashogram but after some days it did stop working this is what I get when I try to start it
Traceback (most recent call last): File "/usr/local/bin/clashogram.py", line 723, in
main()
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in call
return self.main(args, kwargs)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
return callback(args, **kwargs)
File "/usr/local/bin/clashogram.py", line 48, in main
monitor_currentwar(coc_token, clan_tag, bot_token, channel_name)
File "/usr/local/bin/clashogram.py", line 59, in monitor_currentwar
warinfo = coc_api.get_currentwar(clan_tag)
File "/usr/local/bin/clashogram.py", line 128, in get_currentwar
return WarInfo(self.call_api(self.get_currentwar_endpoint(clan_tag)))
File "/usr/local/bin/clashogram.py", line 141, in call_api
raise Exception('Error calling CoC API: %s' % res)