From mariusz.sapinski at gmail.com Thu Dec 8 03:58:20 2022 From: mariusz.sapinski at gmail.com (mariusz sapinski) Date: Thu, 8 Dec 2022 09:58:20 +0100 Subject: [moin-user] the 'decorator' distribution was not found and is required by traitlets Message-ID: Hi, since the last update on my Ubuntu (22.04) box I can't start moinmoin anymore. I run it standalenow, so I start it with: python2 moin.py Now I get error messages which end with: File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2465, in require items = working_set.resolve(reqs, env, installer, extras=self.extras) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'decorator' distribution was not found and is required by traitlets what is it about? And how is python3 version of moinmoin going? Best regards, Mariusz -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at boddie.org.uk Thu Dec 8 07:07:31 2022 From: paul at boddie.org.uk (Paul Boddie) Date: Thu, 08 Dec 2022 13:07:31 +0100 Subject: [moin-user] the 'decorator' distribution was not found and is required by traitlets In-Reply-To: References: Message-ID: <3196097.0oDFkGLMNM@jason> On Thursday, 8 December 2022 09:58:20 CET mariusz sapinski wrote: > Hi, > > since the last update on my Ubuntu (22.04) box I can't start moinmoin > anymore. I run it standalenow, so I start it with: > > python2 moin.py [...] > pkg_resources.DistributionNotFound: The 'decorator' distribution was not > found and is required by traitlets > > what is it about? It sounds like the decorator package was not downloaded or installed correctly: https://pypi.org/project/decorator/ I imagine that pip (or whatever today's Python packaging tool is called) was supposed to install it, but maybe the installation failed. You might want to check in the place where these packages are normally installed to see if there is any trace of the decorator package. Obviously, you will need to be careful how to install these packages. Without a "virtual environment" made by virtualenv (or venv, or whatever today's program is called), you can use pip to install into your user's own package directory. You probably don't want to run these tools as root to install centrally on the system. > And how is python3 version of moinmoin going? As far as I am aware, the work is ongoing. I was working through the exercise of packaging Moin 2 for Debian because Debian (and Ubuntu) have thrown Python 2 overboard along with the Moin 1.9 package, so only Moin 2 can be offered as a package in future. I would say that this packaging work is largely done: https://salsa.debian.org/moin-team (Ignore all the "old" package repositories.) However, changes in some of the packages used by Moin cause Moin itself to be broken: https://github.com/moinwiki/moin/issues/1109 So, the code needs to be adapted to deal with that breakage, but this is an exercise that I didn't really get into, not having written the Moin 2 code in the first place and therefore not being particularly familiar with it. Paul From reuterr at web.de Fri Dec 9 10:22:33 2022 From: reuterr at web.de (Rudolf Reuter) Date: Fri, 9 Dec 2022 16:22:33 +0100 Subject: [moin-user] moin to dokuwiki export does not work, namespace error Message-ID: An HTML attachment was scrubbed... URL: From paul at boddie.org.uk Fri Dec 9 11:40:08 2022 From: paul at boddie.org.uk (Paul Boddie) Date: Fri, 09 Dec 2022 17:40:08 +0100 Subject: [moin-user] moin to dokuwiki export does not work, namespace error In-Reply-To: References: Message-ID: <2244461.JrN3n6FZ6R@jason> On Friday, 9 December 2022 16:22:33 CET Rudolf Reuter wrote: > Hello, > I have tried to convert my MoinMoin wiki v.1.9.9 to dokuwiki. > There is a converter program available, but it does not work. > Reference: https://github.com/glensc/moin2doku > Unfortunately the author no longer want to give support. This program is designed for Moin 1.5, so there may be compatibility issues with various APIs. The Moin wiki syntax changed in Moin 1.6, if I remember correctly, but if this converter uses the Moin parser API and if the dokuwiki formatter is still usable for today's DocuWiki, then maybe it will produce good enough results. Amusingly, the DocuWiki page for that converter makes vague remarks about Moin being "not as stable as it looks like" and links to a German language page related to Ubuntu. Moin has been pretty stable since Moin 1.6 came out, I would say. One more general remark I would make is to consider the availability of tools to migrate from DocuWiki rather than to it. If that scenario isn't great, you may be saving up some pain in the future. > In order to **make testing easier** I replaced in file moin2doku.py > line 243 > opts, args = getopt.getopt(sys.argv[1:], 'hfad:p:r:i:I:', [ "help" ]) > with > sys.argv[1:] = "-F wiki/data/pages/FrontPage" # RR "single page" > parameter sys.argv[2:] = "-d out" > > Unfortunately there is a **namespace problem**. > > What I did to make it run: > Copy the moin2doku files into the moinmoin installation. I guess you have a directory containing the usual Moin distribution, with the MoinMoin directory being the package that gets imported. If you put the moin2doku files in that Moin distribution directory then I think it ought to work. This should mean that when you run moin2doku.py it will find the MoinMoin package and the different modules. If, on the other hand, the MoinMoin directory lives in somewhere like site- packages or dist-packages then I wouldn't copy the moin2doku files into the same location. Instead, just rely on the PYTHONPATH/sys.path to help find the MoinMoin package. > I set all files to owner www-data:www-data You only need to do this to publish the output of the conversion. Setting the owner of these programs shouldn't be necessary, although you will need to make sure that if you are running them as your own user, the permissions on the files and on the Moin sources permit your user's access. > Start moin2doku.py: > **$ sudo python2 moin2doku.py** And so it shouldn't be necessary to run this with superuser privileges. > --- changes in moin2doku.py, use tabs only ! > > When you start moim2doku.py , you get an error in file MoinMoin/user.py line > 27 import md5crypt > > **ImportError**: no module named md5crypt > Path: MoinMoin/support/md5crypt.py > > When you change line 27 from: > import md5crypt > to: > import support.md5crypt > > This error is gone, but then comes the next namespace error. This does look a bit strange. > But the next import fails, and I did not found a solution. > user.py line 38 > MoinMoin/util/filesystem.py > module line 33: support.werkzeug.posixemulationn # support added > ./MoinMoin/support/werkzeug/posixemulation.py > > I am still searching how to **fix the namespace error**. Here, it would be useful to see the actual error message - the traceback - so that we can better understand it and avoid misunderstandings. For example, it is actually MoinMoin/util/filesys.py where the error arises. > It would be very nice if someone with more knowledge could help me please. For now, we may ignore the md5crypt error which may only manifest itself because we are importing MoinMoin.user directly, and because who knows what kind of weird module namespace stuff might be done when Moin is launched normally to prevent it from happening? Again, I find the presence of the error very odd, but then I'm not doing something like this myself very often any more. However, I would guess that the Werkzeug error may have something to do with either a missing package for Werkzeug, the wrong version being installed, or a problem finding it when run as superuser, which you probably shouldn't be doing. Diagnosis involving sys.path could be helpful here. I hope this is useful. Paul From reuterr at web.de Fri Dec 9 13:42:08 2022 From: reuterr at web.de (Rudolf Reuter) Date: Fri, 9 Dec 2022 19:42:08 +0100 Subject: [moin-user] moin to dokuwiki export does not work, namespace error Message-ID: An HTML attachment was scrubbed... URL: From paul at boddie.org.uk Fri Dec 9 16:10:15 2022 From: paul at boddie.org.uk (Paul Boddie) Date: Fri, 09 Dec 2022 22:10:15 +0100 Subject: [moin-user] moin to dokuwiki export does not work, namespace error In-Reply-To: References: Message-ID: <1866571.dDoCbcx7Ac@jason> On Friday, 9 December 2022 19:42:08 CET Rudolf Reuter wrote: > Hello Paul, > Thank you very much for your detailed answers. > > Let me explain how I came to dokuwiki. > > I was was very satisfied with moinmoin wiki for about 15 years. > > Unfortunately after an Ubuntu 22.04 upgrade I had a server crash. Sorry to hear that! > Then I tried to install moinmoin2 again. > The problem was the wsgi package. > The python2 version was no longer available, and I backed up only > the folders /etc, /home and /var, my fault. > > The actual wsgi package is for pathon3 only. > > Then I tried moin2, with little functionality. Yes, Moin 2 isn't really ready for widespread use. Some of us have been packaging it for Debian, which would then mean that it would be more available for Debian and Ubuntu users, and this would also hopefully mean that more people would be able to gain experience with it, improve it, and so on. In my opinion, the current arrangement of having to make virtualenvs/venvs/ whatever and experiencing a very "fluid" situation with regard to dependencies, plus the lack of guidance and support, means that only the most dedicated developers might be interested in using Moin 2. And there probably aren't many of those dedicated developers any more. > Then I found the converter moin2doku, which looked very good. > > I will try to make it work with your hints, but if it does > not work within a reasonable time, I will instal moinmoin v.1.9.9 again. Let us know what the errors are as you experience them. Maybe they are not so significant. Otherwise, Moin 1.9 is really your only option at the moment. Paul From reuterr at web.de Mon Dec 12 13:50:07 2022 From: reuterr at web.de (Rudolf Reuter) Date: Mon, 12 Dec 2022 19:50:07 +0100 Subject: [moin-user] moin to dokuwiki export does not work, namespace error Message-ID: An HTML attachment was scrubbed... URL: