apertium / phenny

This is a port of phenny, a Python IRC bot, to Python3. This specific version, called begiak, is a fork of the Wadsworth version, used by the apertium project.
http://wiki.apertium.org/wiki/Begiak
Other
16 stars 42 forks source link

errors on startup #431

Closed jonorthwash closed 5 years ago

jonorthwash commented 6 years ago

The following errors are showing up at the top of begiak's log on startup:

ERROR: Error during setup of clock.py module:
Traceback (most recent call last):
  File "/home/begiak/phenny/bot.py", line 44, in module_control
    rephrase_errors(getattr(module, func), phenny)
  File "/home/begiak/phenny/tools.py", line 219, in rephrase_errors
    return fn(*args, **kw)
  File "/home/begiak/phenny/modules/clock.py", line 274, in setup
    scrape_wiki_zones(phenny)
  File "/home/begiak/phenny/modules/clock.py", line 250, in scrape_wiki_zones
    phenny.time_zone_abbreviations = scrape_wiki_time_zone_abbreviations()
  File "/home/begiak/phenny/modules/clock.py", line 174, in scrape_wiki_time_zone_abbreviations
    rows = table.find('tbody').findall('tr')
AttributeError: 'NoneType' object has no attribute 'findall'

INFO: Setting up phenny
ERROR: Error during setup of apertium_wikistats.py module:
Network timed out
ERROR: Error during setup of iso639.py module:
Traceback (most recent call last):
  File "/home/begiak/phenny/bot.py", line 44, in module_control
    rephrase_errors(getattr(module, func), phenny)
  File "/home/begiak/phenny/tools.py", line 219, in rephrase_errors
    return fn(*args, **kw)
  File "/home/begiak/phenny/modules/iso639.py", line 162, in setup
    phenny.iso_data = scrape_wiki_codes()
  File "/home/begiak/phenny/modules/iso639.py", line 80, in scrape_wiki_codes
    for row in table.find('tbody').findall('tr')[1:]:
AttributeError: 'NoneType' object has no attribute 'findall'

Also getting this right after startup:

DEBUG: Binding module 'remind' command 'at'
INFO: Connecting to irc.freenode.net:6667...
INFO: connected!
INFO: Authorizing using SASL...
INFO: #apertium
INFO: #hfst
INFO: ##ava
INFO: #matxin
INFO: #_u-dep
svn: E170013: Unable to connect to a repository at URL 'https://svn.code.sf.net/p/apertium/svn'
svn: E175002: Unexpected HTTP status 504 'Gateway Time-out' on '/p/apertium/svn'
ERROR: Traceback (most recent call last):
  File "/home/begiak/phenny/bot.py", line 246, in call
    rephrase_errors(func, phenny, input)
  File "/home/begiak/phenny/tools.py", line 219, in rephrase_errors
    return fn(*args, **kw)
  File "/home/begiak/phenny/modules/svnpoller.py", line 206, in pollsvn
    for (msg, revisions) in pollers[repo].check(global_revisions):
  File "/home/begiak/phenny/modules/svnpoller.py", line 63, in check
    self.latest_revision = self.get_last_revision()
  File "/home/begiak/phenny/modules/svnpoller.py", line 96, in get_last_revision
    tree = self.svn("info")
  File "/home/begiak/phenny/modules/svnpoller.py", line 91, in svn
    return ET.fromstring(data.decode())
  File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 1345, in XML
    return parser.close()
  File "<string>", line None
xml.etree.ElementTree.ParseError: no element found: line 3, column 0
jonorthwash commented 6 years ago

I'm also getting a whole bunch of /msgs from begiak like this:

(03:24:37) begiak: ...
(09:02:54) begiak: ...
(13:32:28) begiak: ...
(13:59:38) begiak: ...
(14:04:48) begiak: ...

I think it's a call for help, but I'm not sure what to do.

jonorthwash commented 6 years ago

spectei is getting the following in \msg, possibly coinciding with what I'm seeing:

(13:59:48) spectei: <begiak> IndexError: no such group (file "/home/begiak/phenny/modules/apertium_wiki.py", line 39, in awik)
(13:59:48) spectei: <begiak> IndexError: no such group (file "/home/begiak/phenny/modules/apertium_wiki.py", line 39, in awik)

Edit: the timestamps from the messages spectei is getting do coincide and seem to be only a little before the messages I'm getting.

sushain97 commented 6 years ago

If the setup for a particular module fails, we should just note that in IRC and disable it instead of failing to bootstrap the entire instance.

Androbin commented 6 years ago

Multiple issues:

sushain97 commented 6 years ago

@jonorthwash could you verify this is fixed?

Androbin commented 5 years ago

I think it's 2 fixed issues, 1 server fault, 1 intended behavior...

jonorthwash commented 5 years ago

I think all of this has been addressed now.