[Moin-user] Pyton error while performing my first edit

Roger Haase crosseyedpenguin at yahoo.com
Wed Feb 26 18:58:08 EST 2003


--- Mark Levison <levisonmark at hotmail.com> wrote:
> Thanks for the help Juergen.  This just gets more confusing.
> 
> Frontpage?test reported I didn't have write access to editlog --
> that's 
> because it didn't exist.
> 
> So I created it and I made all my DarwinWiki directories writable.
> 
> Now ?test reports:
> MoinMoin CGI Diagnosis
> ======================
> 
> Package "MoinMoin" sucessfully imported.
> 
> Release  1.0
> Revision 1.159
> 
> Checking directories...
>     data directory tests OK (set to 'C:\Moin\DarwinWiki\data')
>     text directory tests OK (set to 'C:\Moin\DarwinWiki\data\text')
>     user directory tests OK (set to 'C:\Moin\DarwinWiki\data\user')
>     backup directory tests OK (set to
> 'C:\Moin\DarwinWiki\data\backup')
> 
> 
> Traceback (innermost last):
>   File "C:\Moin\DarwinWiki\moin.cgi", line 22, in ?
>     cgimain.test()
>    File "C:\Moin\Lib\site-packages\MoinMoin\cgimain.py", line 66, in
> test
>     diff = util.popen(config.external_diff + " --version", "r")
> WindowsError: [Errno 5] Access is denied:
> 'C:\\WINDOWS\\system32\\cmd.exe /c 
> diff --version'
> 
> Which begs the question do I need a diff program (which one cygwin?)
> in my 
> PATH? (This is not documented on the installs page)
> 
> But if I try edit the page I get the same permissions problem as
> before (see 
> below for a fresh trace).
> 
> What to do next?
> 
> Thanks for the help so far
> Mark
> 
> 
> OSError: [Errno 13] Permission denied Python 2.2.2
> C:\Python22\python.exe
> 
> A problem occurred while running a Python script. Here is the
> sequence of 
> function calls leading up to the error, with the most recent
> (innermost) 
> call first. The exception attributes are:
>       __doc__ = 'OS system call failed.'
>       __getitem__ = <bound method OSError.__getitem__ of
> <exceptions.OSError 
> instance at 0x0071B558>>
>       __init__ = <bound method OSError.__init__ of
> <exceptions.OSError 
> instance at 0x0071B558>>
>       __module__ = 'exceptions'
>       __str__ = <bound method OSError.__str__ of <exceptions.OSError 
> instance at 0x0071B558>>
>       args = (13, 'Permission denied')
>       errno = 13
>       filename = None
>       strerror = 'Permission denied'
> 
> C:\Moin\Lib\site-packages\MoinMoin\PageEditor.py in 
> _write_file(self=<MoinMoin.PageEditor.PageEditor instance at
> 0x0071B5B0>, 
> text='#pragma section-numbers off\n\nThis is a test\n... search or
> browse 
> the database in various ways\n')
>   360                 and not is_deprecated:
>   361             os.rename(page_filename,
> os.path.join(config.backup_dir,
>   362                 wikiutil.quoteFilename(self.page_name) + '.' + 
> str(os.path.getmtime(page_filename))))
>        global wikiutil = <module 'MoinMoin.wikiutil' from 
> 'C:\Moin\Lib\site-packages\MoinMoin\wikiutil.pyc'>, global
> quoteFilename = 
> undefined, self = <MoinMoin.PageEditor.PageEditor instance at
> 0x0071B5B0>, 
> global page_name = undefined, global str = undefined, global os =
> <module 
> 'os' from 'C:\Python22\lib\os.pyc'>, global path = undefined, global 
> getmtime = undefined, page_filename = 'data\\text\\FrontPage'
>   363         else:
>   364             if os.name == 'nt':
> 

This may be a case of the truly blind trying to lead the blind... I run
W/ME and the closest I have come to IIS is running PWS for a short
while long ago.

Let's ignore the diffs problem for a moment, it seems to be similar to
the other problem.

When you say you made your DarwinWiki directories writeable... don't
you have to set both XP permissions and IIS permissions separately? 

I am thinking that these instructions...

'''
Now follow the same steps, but set the alias to "mywiki" and the path
to "C:\Moin\mywiki".

Now you need to setup the 'mywiki' alias so that it will run Python to
interpret .cgi files. Right click on your new 'mywiki' alias and choose
Properties. On the first tab (Virtual Directory), click the
Configuration button. The first tab is the App Mappings tab, which
defines which programs to use for each file exetension. Click Add.
Browse to your python.exe (probably something like
c:\pythonXX\python.exe). Then add -u %s %s after the Python executable
path. The Executable line will look something like this:
C:\Python22\python.exe -u %s %s. In the Extension box enter .cgi with
the begining period. Confirm that the Check that file exists option is
not checked (if it is, MoinMoin won't be able to display sub pages).
Ok, you're done with the alias configuration, click OK several times to
get back out of all the dialog boxes. 
'''

...perhaps should have said something about setting about setting
Access Permissions, Write in particular, and perhaps Directory browsing
as well for the mywiki directory.

If the above is of any help, the cygwin diff should work, either placed
in your system path or explicitly pointed to in moin_config.py:
   external_diff = r'c:\Download\MoinMoin\diff.exe' 
However, I think a similar permission problem exists which needs
fixing.

HTH,

Roger Haase

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/




More information about the Moin-user mailing list