As another try, I ran web2py (1.67.1) with its builtin server as
python web2py.py -p 443 -c /path/to/server.crt -k /path/to/server.key -
a <recycle> -i 192.168.1.81
When i acess to web2py from a PC thru the LAN, it works fine including
Admin over HTTPS, but issues the following ticket when 'versioning' is
pushed in Admin.

Error traceback
Traceback (most recent call last):
  File "gluon/restricted.py", line 178, in restricted
    exec ccode in environment
  File "/var/www/web2py/applications/admin/views/mercurial/
commit.html", line 54, in <module>
TypeError: 'mqrepo' object is unsubscriptable

commit.html:54 shows
response.write(repo[None].rev())

--
Teru


On 9月22日, 午後8:44, suiato <homm...@gmail.com> wrote:
> Hi Anthon
>
> yes, i'm interested since i have  web2py running in mod_wsgi.
>
> in my current setting, hittingn the 'versioning' menu issues a ticket
> IOError: sys.stdin access restricted by mod_wsgi
>
> --
> Teru
>
> Error ticket for "admin"
> Error traceback
>
> Traceback (most recent call last):
>   File "gluon/restricted.py", line 178, in restricted
>     exec ccode in environment
>   File "/var/www/web2py/applications/admin/controllers/mercurial.py",
> line 29, in <module>
>   File "gluon/globals.py", line 102, in <lambda>
>     self._caller = lambda f: f()
>   File "/var/www/web2py/applications/admin/controllers/mercurial.py",
> line 6, in commit
>     uio = ui.ui()
>   File "/var/lib/python-support/python2.5/mercurial/ui.py", line 50,
> in __init__
>     self.readconfig(util.rcpath())
>   File "/var/lib/python-support/python2.5/mercurial/ui.py", line 166,
> in readconfig
>     self.fixconfig(root=root)
>   File "/var/lib/python-support/python2.5/mercurial/ui.py", line 222,
> in fixconfig
>     self.interactive = self.isatty()
>   File "/var/lib/python-support/python2.5/mercurial/ui.py", line 74,
> in isatty
>     ui._isatty = sys.stdin.isatty()
> IOError: sys.stdin access restricted by mod_wsgi
>
> On 9月22日, 午後6:12, Anthon <anthon.van.der.n...@googlemail.com> wrote:
>
> > Is anyone using theversioningfeature?
> > It seems currently broken out of the box on my mod_wsgi/apache system.
> > The main problem exists because mercurial writes to sys.stdout if some
> > warning/error occurs.
> > On my fresh system I get those writes because of two issues:
> > - non existence of a username in ~/.hgrc for the user running apache
> > - readding already added files
>
> > The one thing you can do is to capture sys.stdout in mercurial.py:
> > commit,
> > but that hides all messages/error writing from mercurial.
> > The two issues can be resolved differently:
> > - by checking for the .hgrc and setting HGUSER if it is not available
> > - by using a .hgignore file and not adding an explicit list in
> > mercurial.py but using hg addremove option (that is also much nicer
> > when doing mercurial commands in the application directory from the
> > commandline as it hides all the non-tracked data)
>
> > I can provide a patch if there is interest in this way of solving this
> > issue
>
> > Anthon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to