Traceback (most recent call last):
File "/data/data/com.termux/files/home/vikaspy/pwb.py", line 399, in
if not main():
File "/data/data/com.termux/files/home/vikaspy/pwb.py", line 391, in main
File "/data/data/com.termux/files/home/vikaspy/pwb.py", line 106, in
exec(compile(source, filename, 'exec', dont_inherit=True),
File "./scripts/replace.py", line 1075, in <module>
File "./scripts/replace.py", line 929, in main
single_summary = i18n.twtranslate(
line 404, in wrapper
return obj(*__args, **__kw)
File "/data/data/com.termux/files/home/vikaspy/pywikibot/i18n.py", line
700, in twtranslate
pywikibot.exceptions.TranslationError: Unable to load messages package
scripts.i18n for bundle replace-replacing
It can happen due to lack of i18n submodule or files. See
CRITICAL: Exiting due to uncaught exception <class
How do people install their bots into toolforge? In the past, I've just done a "git pull" to the bastion host and run with the code directly out of the source tree, but I'm not sure that's a good plan.
My current project is a more complicated, with a bot that I'm going to run on krb as a toolforge cron job <https://wikitech.wikimedia.org/wiki/Help:Toolforge/Jobs_framework#Creating_…>, a web service that's going to run via "webservice --backend=kubernetes python3.9 start" and also some command-line scripts that I'll want to run interactively. All this code will be in the same git repo. So I'm thinking of building a wheel and installing it that way. So, I guess that means building the wheel locally with setuptools, scp the wheel over to the bastion, shell into a krb node to do "pip install" into my virtualenv.
The stumbling block with that plan seems to be that toolforge insists on your webapp being installed at $HOME/www/python/src/app.py, which isn't going to play well with a wheel installation.
I never thought I'd ever write this, but after close to 40 years of using emacs for everything, I'm thinking of switching to a real IDE for python development. My latest evolution is emacs with elpy, which is pretty powerful as these things go, but I seem to spend more time configuring emacs and less time writing code than I want to. I got clarity on this the other day when I was comparing the toolforge bastion hosts, the cloud VPS images, and the kubernetes back ends to see which versions of emacs each one had and realized this really was the tail wagging the dog.
I've heard good things about Sublime, but never used it. I'm not averse to purchasing a license if it's worth it.
I've used Eclipse in the past for Java, and was pretty happy with that. I gather that Eclipse + PyDev is pretty neat but never tried it.
I know a lot of people live in Jupyter, but that's not really my style.
What else should I be looking at? What are folks out there using?
I got a mail from Gerrit with the above subject.
Just to put my 2 cents: while this change may help the regex to be more
readable, such changes in high-scale may harden the transforming of regexes
between Pywikibot format and AWB format, and we have a Phab ticket about
the cooperation. As we use more Python-specific regexes, the Pywikibot
users and AWB uers may be able to help each other less on bot owners'
This is not a critics, just a point of view which may worth to consider.
except ImportError as e:
mwparserfromhell = e
langdetect = None
Later it examines
if isinstance(mwparserfromhell, Exception):
Why is it good to delay in such complicated way? Why does not handle the
script the error at once?
I want to invent a script dealing with tables. It could be used directly
with simple arguments and imported in order to use advanced functions. What
is the good way of handling import error? I don't like this mismatch that
mwparserfromhell is either a module or an Exception, is there any advantage
of this solution?