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

.awikstats crashes #600

Open jonorthwash opened 3 years ago

jonorthwash commented 3 years ago

In response to (12:48:58) firespeaker: .awikstats update alt:

(12:49:06) begiak: /home/begiak/phenny/apertium_wikistats_bot.py:87: SyntaxWarning: "is" with a literal. Did you mean "=="?
(12:49:08) begiak:   for countName in sorted(fileCounts.keys(), key=lambda countName: (fileCounts[countName] and fileCounts[countName][0] is 0, countName)):
(12:49:09) begiak: /home/begiak/phenny/apertium_wikistats_bot.py:98: SyntaxWarning: "is" with a literal. Did you mean "=="?
(12:49:10) begiak:   if count is 0:
(12:49:12) begiak: /home/begiak/phenny/apertium_wikistats_bot.py:106: SyntaxWarning: "is" with a literal. Did you mean "=="?
(12:49:13) begiak:   if count is 0:
(12:49:14) begiak: /home/begiak/phenny/apertium_wikistats_bot.py:137: SyntaxWarning: "is" with a literal. Did you mean "=="?
(12:49:16) begiak:   for countName in sorted(fileCounts.keys(), key=lambda countName: (fileCounts[countName] and fileCounts[countName][0] is 0, countName)):
(12:49:18) begiak: /home/begiak/phenny/apertium_wikistats_bot.py:169: SyntaxWarning: "is" with a literal. Did you mean "=="?
(12:49:20) begiak:   for countName in sorted(fileCounts.keys(), key=lambda countName: (fileCounts[countName] and fileCounts[countName][0] is 0, countName)):
(12:49:22) begiak: /home/begiak/phenny/apertium_wikistats_bot.py:381: SyntaxWarning: "is" with a literal. Did you mean "=="?
(12:49:22) begiak:   if len(fileCounts) is 0:
(12:49:23) begiak: INFO:root:Login as Firespeaker@StemCounterBot succeeded
(12:49:28) begiak: INFO:root:Acquired file counts {'vanilla stems': ('284', ('https://raw.githubusercontent.com/apertium/apertium-alt/83eba775c8b921c1faee542de7e12b8404c18d01/apertium-alt.alt.lexc', 'jonorthwash', '83eba7'), 'https://raw.githubusercontent.com/apertium/apertium-alt/master/apertium-alt.alt.lexc'), 'stems': ('284',
(12:49:33) begiak: ('https://raw.githubusercontent.com/apertium/apertium-alt/83eba775c8b921c1faee542de7e12b8404c18d01/apertium-alt.alt.lexc', 'jonorthwash', '83eba7'), 'https://raw.githubusercontent.com/apertium/apertium-alt/master/apertium-alt.alt.lexc'), 'rules': ('2', ('https://raw.githubusercontent.com/apertium/apertium-alt/b8dab8fdf110d6aa23d7dab7053fdee9e018a1cc/apertium-alt.alt.rlx', 'jonorthwash', 'b8dab8'),
(12:49:35) begiak: 'https://raw.githubusercontent.com/apertium/apertium-alt/master/apertium-alt.alt.rlx')}
(12:49:36) begiak: INFO:root:Update of page Apertium-alt/stats succeeded (https://wiki.apertium.org/wiki/Apertium-alt/stats)

This appears to be a series of syntax errors in the code (!?).

sushain97 commented 3 years ago

It's a syntax warning introduced in Py 3.8. Shouldn't be fatal given that it's a warning rather than an error?

On Sun, Aug 8, 2021, 9:51 AM Jonathan Washington @.***> wrote:

In response to (12:48:58) firespeaker: .awikstats update alt:

(12:49:06) begiak: /home/begiak/phenny/apertium_wikistats_bot.py:87: SyntaxWarning: "is" with a literal. Did you mean "=="? (12:49:08) begiak: for countName in sorted(fileCounts.keys(), key=lambda countName: (fileCounts[countName] and fileCounts[countName][0] is 0, countName)): (12:49:09) begiak: /home/begiak/phenny/apertium_wikistats_bot.py:98: SyntaxWarning: "is" with a literal. Did you mean "=="? (12:49:10) begiak: if count is 0: (12:49:12) begiak: /home/begiak/phenny/apertium_wikistats_bot.py:106: SyntaxWarning: "is" with a literal. Did you mean "=="? (12:49:13) begiak: if count is 0: (12:49:14) begiak: /home/begiak/phenny/apertium_wikistats_bot.py:137: SyntaxWarning: "is" with a literal. Did you mean "=="? (12:49:16) begiak: for countName in sorted(fileCounts.keys(), key=lambda countName: (fileCounts[countName] and fileCounts[countName][0] is 0, countName)): (12:49:18) begiak: /home/begiak/phenny/apertium_wikistats_bot.py:169: SyntaxWarning: "is" with a literal. Did you mean "=="? (12:49:20) begiak: for countName in sorted(fileCounts.keys(), key=lambda countName: (fileCounts[countName] and fileCounts[countName][0] is 0, countName)): (12:49:22) begiak: /home/begiak/phenny/apertium_wikistats_bot.py:381: SyntaxWarning: "is" with a literal. Did you mean "=="? (12:49:22) begiak: if len(fileCounts) is 0: (12:49:23) begiak: INFO:root:Login as @.*** succeeded (12:49:28) begiak: INFO:root:Acquired file counts {'vanilla stems': ('284', ('https://raw.githubusercontent.com/apertium/apertium-alt/83eba775c8b921c1faee542de7e12b8404c18d01/apertium-alt.alt.lexc', 'jonorthwash', '83eba7'), 'https://raw.githubusercontent.com/apertium/apertium-alt/master/apertium-alt.alt.lexc'), 'stems': ('284', (12:49:33) begiak: ('https://raw.githubusercontent.com/apertium/apertium-alt/83eba775c8b921c1faee542de7e12b8404c18d01/apertium-alt.alt.lexc', 'jonorthwash', '83eba7'), 'https://raw.githubusercontent.com/apertium/apertium-alt/master/apertium-alt.alt.lexc'), 'rules': ('2', ('https://raw.githubusercontent.com/apertium/apertium-alt/b8dab8fdf110d6aa23d7dab7053fdee9e018a1cc/apertium-alt.alt.rlx', 'jonorthwash', 'b8dab8'), (12:49:35) begiak: 'https://raw.githubusercontent.com/apertium/apertium-alt/master/apertium-alt.alt.rlx')} (12:49:36) begiak: INFO:root:Update of page Apertium-alt/stats succeeded (https://wiki.apertium.org/wiki/Apertium-alt/stats)

This appears to be a syntax error in the code (!?).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apertium/phenny/issues/600, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAEI7X5ZVM4C7XWIUBRJBLT32Y2PANCNFSM5BYU52DA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

jonorthwash commented 3 years ago

Yeah, seemed to work despite that.