[web2py] Re: Can not run web2py_no_console.exe. Version 2.8.2 on win 7 x 64

2013-12-21 Thread sherdim

On Sunday, December 15, 2013 4:36:47 PM UTC+4, Niphlod wrote:

 open a dos prompt, cd into the folder and try to start it from there to 
 see if it prints something...

 BTW: is web2py.exe working ? 


Yes, but web2py_no_console.exe  quits silently

 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: 2.4.7 problems

2013-10-07 Thread sherdim


 The source of the problem is in the gluon/cache.py

When I have revert this only file to the version of 2012-09-18 - cache.disk 
is working again

below the method from that file, which have became errorous in the last 
versions:

def _open_shelf_with_lock(self):
Open and return a shelf object, obtaining an exclusive lock
on self.locker first. Replaces the close method of the
returned shelf instance with one that releases the lock upon
closing.
def _close(self):
try:
shelve.Shelf.close(self)
finally:
portalocker.unlock(self.locker)
self.locker.close()

storage, locker, locker_locked = None, None, False
try:
locker = open(self.locker_name, 'a')
portalocker.lock(locker, portalocker.LOCK_EX)
locker_locked = True
storage = shelve.open(self.shelve_name)
storage.close = _close.__get__(storage, shelve.Shelf)
storage.locker = locker
except Exception:
logger.error('corrupted cache file %s, will try to delete and 
recreate it!' % (self.shelve_name))
if storage:
storage.close()
storage = None

try:
os.unlink(self.shelve_name)
storage = shelve.open(self.shelve_name)
storage.close = _close.__get__(storage, shelve.Shelf)
storage.locker = locker
if not CacheAbstract.cache_stats_name in storage.keys():
storage[CacheAbstract.cache_stats_name] = {
'hit_total': 0,
'misses': 0,
}
storage.sync()
except (IOError, OSError):
logger.warn('unable to delete and recreate cache file %s' % 
self.shelve_name)
if storage:
storage.close()
storage = None
if locker_locked:
portalocker.unlock(locker)
if locker:
locker.close()
return storage


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Support for PyPy

2012-02-28 Thread sherdim
What the difference in the speed?

On Friday, February 10, 2012 7:35:40 PM UTC+4, Sathvik Ponangi wrote:

 Is there some way to run Web2Py on PyPy http://pypy.org?



[web2py] Re: UnicodeEncodeError on GAE

2012-02-16 Thread sherdim
I Think it is a bug  as for 1.99.4
When a form tries to keep values w/ non ascii characters

if form.accepts(request.vars,session, formname=sP, keepvalues=True):
  File C:\a\w2p\gluon\html.py, line 1801, in accepts
status = self._traverse(status,hideerror)
  File C:\a\w2p\gluon\html.py, line 743, in _traverse
newstatus = c._traverse(status,hideerror) and newstatus
  File C:\a\w2p\gluon\html.py, line 751, in _traverse
self._postprocessing()
  File C:\a\w2p\gluon\html.py, line 1585, in _postprocessing
_value = str(self['_value'])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-8: 
ordinal not in range(128)


Is str instruction ever needed? If yes -  additional check for unicodes 
with proper utf-8 conversion  is needed just before.

IMHO str at 1585 is excessive - all is fine  when deleted 



[web2py] Re: deploying web2py on IIS

2011-09-16 Thread sherdim
Hope, you will be satisfied with Apache.

I have other sites/apps on the IIS, so I wanted web2py on the same platform.

If you had default isapi_wsgi example app working - then no incompatibility 
with dll (32/64 bit issues etc).

if any webserver  is proper for you - you can use default web2py rocket as 
well IMHO.

Good luck


[web2py] Re: deploying web2py on IIS

2011-09-14 Thread sherdim
Hello, Omi!
 

 Do you have any idea where I should check ? 

 I use IIS 7.5 with IIS 6 Management Cimpatibility. 

 1. Check you app is working through usual web2py startup. 

2. if you did junction folder - set full access for IIS_WPG for the target 
folder ...\applications
also check access for _ochibaapp.dll

3. check app pool in the IIS admin snap-in - most default setting are good 
but may be they were changed

And the main thing - relaunch all IIS services after every reconfig (restart 
IIS Admin service).
And remember relaunch the apppool after app changes - because IIS keeps your 
app ready in memory for a while



[web2py] Re: deploying web2py on IIS

2011-09-09 Thread sherdim
Hello Omi!

first, junction (as you read in receipt) is needed for ability to launch 
development version of web2py on the same source.
anyway you can copy all web2py folder and syncronize them as needed

Step 2.3.2 Configure routes - is standard for web2py and described in the 
book.
it sets relative path to your application files.

In the beginning you should realise where are your application directories. 
You should check they are workable with standard web2py.py launcher.

Then check permissions for folders - so IIS can access them with given 
credentials (it is described in the receipt).

you should skip 2.3.4 - it has sense on big production server if any

As I see your isapi_web2py.py script cannot access application files 
(directory is empty)
try at first simple copy instead junction

In the end of 2.3.1 there are typos in path - slashes are escaped - be 
careful or just allow All Unknown ISAPI Extentions.

for testing try in the section for interactive launch of isapi_web2py.py 
script 

if __name__=='__main__':
  import gluon.main
call from command line - to be sure gluon is on the path and accessible

Write here your directory configuration if you are still lost.
Think about web2py directory as a single ready application which just should 
plugged to IIS.

Best regards




[web2py] Slice for Windows Installation with speed tests

2011-05-12 Thread sherdim
Good day!

I've completed slice http://www.web2pyslices.com/main/slices/take_slice/128 
on WSGI deployment on Windows Server.


Comments on benchmark testing are welcome!

Is it good speed?

Is some caveats in parallel handling of requests? Can be issues with 
sessions congruence?


Vale!


[web2py] Re: Strange SSL upload issue

2011-05-12 Thread sherdim
The issue is off when use the same site through  ISAPI-WSGI as describe in 
http://www.web2pyslices.com/main/slices/take_slice/128

So it was related to Rocket server timeout on low-speed connection.

Reverse Proxy effect could be in slowing of upload.


[web2py] Slice on deployment web2py on Windows with IIS with tests completed

2011-05-12 Thread sherdim
Good day!

I have completed slice with receipts of deployment web2py in Windows 
environment
http://www.web2pyslices.com/main/slices/take_slice/128
Comments on performance tests are welcome!

Is this speed good?

Can parallel using of many workers (Web Forest) break sessions?

Vale!
 

[web2py] Re: Slice for Windows Installation with speed tests

2011-05-12 Thread sherdim
funny :)

I have just  searched for message about IIS, have not found any new one and 
reposted the same message with anons about the slice.

Sorry for double.


[web2py] Re: Strange SSL upload issue

2011-04-13 Thread sherdim
Thank you for your efforts!

Meanwhile i will try wsgi from IIS.

The main question - can I rollback to some last year version before some 
code improvement, where uploads were robastly stable???

Namely suspicious copystream  from fileutils.py which open error bringing 
socket.

Or may be somewhere to extend timeout ? or keep-alive flag?

FYI: In IE7 there is progressbar in the middle of the statusbar, filled with 
green squares


Vale!


[web2py] Re: Strange SSL upload issue

2011-04-11 Thread sherdim
Hello!

I have the same pain as described!

Some file uploads end with :

Traceback (most recent call last):
  File D:\a\w2p\gluon\main.py, line 410, in wsgibase
parse_get_post_vars(request, environ)
  File D:\a\w2p\gluon\main.py, line 266, in parse_get_post_vars
request.body = copystream_progress(request) ### stores request body
  File D:\a\w2p\gluon\main.py, line 134, in copystream_progress
copystream(source, dest, size, chunk_size)
  File D:\a\w2p\gluon\fileutils.py, line 331, in copystream
data = src.read(chunk_size)
  File C:\a\Python\lib\socket.py, line 351, in read
data = self._sock.recv(left)
timeout: timed out

It is only for uploads of images (photos)
Text-only updates goes fine.

From the localnet it is all right.

Server: Windows Server 2003, web2py from source on the rocket

web2py™ Version 1.94.6 (2011-03-27 18:20:38)  Python Python 2.6.2


The same error with and w/o proxy

Help, please!




[web2py] appadmin insert broken if session.forget()

2011-03-11 Thread sherdim
Hello!

In the recent versions of web2py appadmin silently cannot insert new records 
if session.forget() in the model

At least in Version 1.90.6 (2010-12-20 11:24:15) it is working!

remedy is simple, but silent disfunction discourages

Vale!


[web2py] SQLTABLE failed with new DAL

2010-08-13 Thread sherdim
Good day, ALL!

After update in one of old app the error appears:

Traceback (most recent call last):
  File D:\a\w2p\gluon\restricted.py, line 186, in restricted
exec ccode in environment
  File D:/a/w2p/applications/bioforum/views/manage.html, line 165,
in module
div class=content
  File D:\a\w2p\gluon\sqlhtml.py, line 1175, in __init__
r = field.represent(r)
  File D:\a\w2p\gluon\sql.py, line 498, in lambda
field.represent = lambda id, r=referenced, f=ff: f(r,id)
  File D:\a\w2p\gluon\sql.py, line 472, in ff
return r._format(row)
TypeError: 'NoneType' object is not callable

This is happened only with one main table - other simple tables are
shown nice.

Nothing special is in the table - database SQLite, integrity is OK

Error is off after I change sql.py with sql.py.orig!!!

Think a bug or incompatibility.


[web2py] Re: shell and cache problem

2010-04-08 Thread sherdim
UPS, sorry

it was not related to update

there was some bug in the model, so it cannot load

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@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.



[web2py] Re: shell and cache problem

2010-04-08 Thread sherdim
The bug was to assume that typical variables in request.env are always
set.

But inside shell request.env has only these:

Storage {'http_host': '127.0.0.1:8000', 'path_info': '/eplab/None/
None
', 'remote_addr': '127.0.0.1'}

so difficult to imagine where is bug if always work inside browser.

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@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.



[web2py] Re: response.files.append are broken

2010-02-23 Thread sherdim
oh, yes
I have looked at the code in the web2py_ajax.htm - ingenious and
simple !

Though it is a narrow topic of using of web2py_ajax, which is
optional, it concerns an important issue of the following to the web
standards.

The W3C validator swears hard on styles inside body. But the template
system of web2py does not suppose the overt way to append style
modules in the final html-templates.

So it concerns an important design issue. The  response.files handler
is a real way to meet the standards.

I do not know about the need to compulsory transfer of all style-
snippets to the HEAD - I think any webmaster  should decide himself.
But the documentation or the book should state overtly:

To append the given JSCSS lib in the given terminal template, from
which  all HTML will get inside BODY tag of the parent template, use
the collection response.files. Links to the lib modules could be
appended to the end of the standard link collection of web2py_ajax.htm
template, which is parsed inside HEAD tag. As a result you will have a
flexible template hierarchy to generate web pages in the concordance
with the W3C standards. IMPORTANT!!! Insert in the response.files
before the extend instruction of the template:

e.g.
{{
response.files.append(URL(r=request,c='static',f='highslide/
highslide.js'))
response.files.append(URL(r=request,c='static',f='highslide/
highslide.css'))
}}
{{extend 'layout.html'}}
OTHER HTML code ...


++: you need not to organize extra procedure calls from the HEAD of
the parent template (layout.html) to check whether a child template
declares such procedure.

--: you must use  web2py_ajax.htm (or its analog)

Vale!

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@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.



[web2py] response.files.append are broken

2010-02-21 Thread sherdim
Instructions response.files.append for new js and css imports don't
work in the view file when inserted in the body.

Is it by design? and they are allowed in the head of layout.html only?

Vale!

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@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.



[web2py] application path in module

2010-02-20 Thread sherdim
Hello,all!

How to get application path inside module correctly?

When using os.getcwd() for web2py root it is needed the application
path also.

request is not available, is it?

Vale!

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@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.



[web2py] Re: application path in module

2010-02-20 Thread sherdim
OK, what I should import in my module?

The module is supposed detouchable, developed for the extra web2py use
also

What a clever way to check web2py, to import only needed
gluon.globals.Request and to resolve exception if any?

Also:  if I really need only  some functions from my hypothetic
module, how to optimize functions (may be classes) for a better
performance?
To import only needed function inside functions in controller? Or to
import * (all) inside model? Will be any difference? What will be
impact of the ballast inside that module (extra lib imports etc)?

Finally - is it practical to develop universal pythonic module, for
which the work inside web2py will be optional? It is like GAE is
optional for web2py, but can be web2py is optional for my tiny lib? Or
the better to make a special wrapper inside module folder and to push
other staff into site-packages?

Vale!

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@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.



[web2py:29361] Re: Every while and then file upload fails

2009-08-25 Thread sherdim

I agree that the problem exists.

In my app a manager regularly complains on this error when uploading
photos.

attempts to increase timeout in the class HttpServer didn't help
error can emerge through a couple of seconds

His system: Windows Vista, IE7

Server: Windows Server 2003, web2py in source
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[web2py:19366] Raw filesystem instead DB

2009-04-07 Thread sherdim

Hello, Massimo and all!

Could you explain whether would web2py work with dispersed datafiles
in some folder structure?
Such kind of data storage provides separated data objects in XML or
JSON format with not-limited security (any of NTFS features). Also the
easy merge of local and remote (web) data objects is possible.

I guess it can be done with special code in controllers only.
But could be any profit from web2py's Database Abstraction Layer in
such environment?
For example, some

db = FILEDB(‘xmlrepos://user:passw...@hostname/dataroot')
db.define_table('person',  'URL/person.xsd') - indeed create subfolder
for file-records with the given schema.
and so on, only instead of sql table there is a file directory with
file-records, all with the same structure.

The principal wish is to use autogenerated forms with validators from
such model.
Is it possible to construct in controller a custom substitute of
form=SQLFORM(db.table)  for using  {{=form}} in the view after that?

Vale!





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework 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
-~--~~~~--~~--~--~---