Description
The new dump.py introduced in Moin 1.5.3RC1 works on Windows/xp but fails on 'nix. The below is from 1.5.3, same failure occurs on 1.5.4.
> /usr/lib/python2.3/site-packages/MoinMoin/script/moin.py \ > --config-dir=/usr/local/moin-1.5.3/share/moin/SeatrackProject \ > --wiki-url=server.frv.dk/SeatrackProject/ export dump > > ERROR: > Traceback (most recent call last): > File "moin.py", line 22, in ? > run() > File "moin.py", line 15, in run > _util.MoinScript().run(showtime=0) > File > "/usr/local/moin-1.5.3/lib/python2.3/site-packages/MoinMoin/script/_util.py", > line 82, in run > self.mainloop() > File > "/usr/local/moin-1.5.3/lib/python2.3/site-packages/MoinMoin/script/_util.py", > line 141, in mainloop > plugin_class(args[2:], self.options).run() # all starts again > there > File > "/usr/local/moin-1.5.3/lib/python2.3/site-packages/MoinMoin/script/_util.py", > line 82, in run > self.mainloop() > File > "/usr/local/moin-1.5.3/lib/python2.3/site-packages/MoinMoin/script/export/dump.py", > line 91, in mainloop > outputdir = os.path.abspath(self.options.target_dir) > File "/usr/lib/python2.3/posixpath.py", line 395, in abspath > if not isabs(path): > File "/usr/lib/python2.3/posixpath.py", line 49, in isabs > return s.startswith('/') > AttributeError: 'NoneType' object has no attribute 'startswith'
Workaround
Replace the following line 91 with a hard coded output directory.
# outputdir = os.path.abspath(self.options.target_dir) outputdir = '/home/myname/myoutputdir'
Discussion
Please add the exact moin command you used for this.
Usually it should work then you specify --target-dir=.... on the command line.
moin --config-dir=/my/cfgdir --wiki-url=wiki.example.org/ export dump --page=WikiSandBox --target-dir=/tmp/wtf
You are correct. The --target-dir parameter was not documented anywhere that I could find. I updated MoinDump, but it still needs more work. If you give me update authority on moin master back, I will update it there.
Read EditingOnMoinMaster - and thanks for helping.
Should dump.py abend, put out an error message, or use the current directory like Windows if --target-dir is omitted?. RogerHaase
I think it should abort with no target dir, same under all OSes. It is not nice to put some thousand files flat into current dir, if you want that, you should specify --target-dir=. to get that.
Plan
- Priority:
- Assigned to:
- Status: fixed in 1.5 branch, prints error msg now when target dir is missing