Not sure about the logging config, I setup this:
# generic app handler
[logger_app]
level=DEBUG
qualname=web2py.app
handlers=consoleHandler,rotatingFileHandler
propagate=0
and run scheduler with -D 0, but nothing on console ... just exits
silently. I will try to isolate it somehome so I could
can i lock a table as readonly during the transaction? the case is i need
to insert a record to table B which is base on the query result of table A,
i would like to lock table A as readonly until i finish the insert.
i am using mysql at the moment. i know web2py may not have this feature,
Hi All,
I am studying the hosting of photo application (possibly having big number
of photos).
100,000 photo * 1 MB = 100 GB
Any recommendations...
Ashraf
--
Scheduler logs to the root handler ...
On Thursday, October 11, 2012 8:05:17 AM UTC+2, David Marko wrote:
Not sure about the logging config, I setup this:
# generic app handler
[logger_app]
level=DEBUG
qualname=web2py.app
handlers=consoleHandler,rotatingFileHandler
propagate=0
and
logging.conf looks like this:
[logger_root]
level=DEBUG
handlers=consoleHandler,rotatingFileHandler
And nothing ...
c:\web2pyc:\python27\python.exe web2py.py -K enterprise_search -D 0
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2012
Version 2.1.0 (2012-10-10 15:15:45) dev
make sure that also the consolehandler is on DEBUG level
[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=simpleFormatter
args=(sys.stdout,)
On Thursday, October 11, 2012 10:38:11 AM UTC+2, David Marko wrote:
logging.conf looks like this:
[logger_root]
level=DEBUG
Ok, seems the setup is correct for now. Here is the full report
c:\java\web2pyc:\python27\python.exe web2py.py -K enterprise_search -D 0
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2012
Version 2.1.0 (2012-10-10 15:15:45) dev
Database drivers available: SQLite(sqlite3),
Thanks for your explanation Niphlod. ;)
I'm trying to normalize the time, as you suggested.
However I'm facing some difficulties.
In particular I created an additional field in my table to store the
normalized time (UTC) too. So now my table looks like that:
db.define_table('news',
uhm. I can't reproduce the issue. For me form.vars.whatever if is a field
of type datetime is a datetime tuple. Request.vars.whatever on the other
hand is always a string, as it should be.
Try with a fresh table
PS: having a db with a column named date is a call for problems ...
On Thursday,
type 'exceptions.ValueError' unsupported format character 'A' (0x41) at
index 53VERSIONweb2py™(1, 99, 4, datetime.datetime(2011, 12, 14, 14, 46,
14), 'stable')PythonPython 2.7.2: C:\Python27\python.exeTRACEBACK
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
Changed the name of the field from date to created_on to avoid
confusion.
Tried with a fresh table.
Result:
*form.vars.created_on* seems to be still an object of type str.
Am I missing something? :-/
Cheers,
David
On 11 October 2012 11:45, Niphlod niph...@gmail.com wrote:
uhm. I can't
I dont understand the error anyone can help me with it ?
regards,
On Thursday, October 11, 2012 1:52:53 PM UTC+3, Hassan Alnatour wrote:
type 'exceptions.ValueError' unsupported format character 'A' (0x41) at
index 53VERSIONweb2py™(1, 99, 4, datetime.datetime(2011, 12, 14, 14, 46,
14),
This is perhaps a problem with google groups. Only reasons I am saying this
is because this happened to me on d3.js google groups.
I had to repost in the chain and then it worked.
On Wednesday, October 10, 2012 10:04:50 PM UTC-4, Massimo Di Pierro wrote:
I have seen some delete posts. We do
Hi Massimo,
I think I probably figured what you were saying: Validation passes on
localhost, but not on dotcloud because of some problem on their servers.
Would appreciate if you let me know whether that is a correct
interpretation, before I tell them that it is a problem on their side.
On
El miércoles, 10 de octubre de 2012 22:56:23 UTC-3, Massimo Di Pierro
escribió:
Both of the examples below should work with the right MARKMIN parameters.
What would be the correct parameters for MARKMIN?
José
--
Certain changes to a model will hang rocket, like this one. This happens
with Postgres, psycopg2, Web2py 2.0.9.
1. Define a table field like this:
Field('name', length=64, required=True, requires=IS_NOT_EMPTY(),
notnull=True)
2. Change the field name because of a naming collision, like this:
Sometimes the message was deleted, if I forgot to wrap the code through
apposite tool (button with braces symbol) . Maybe for security reasons.
Il giorno giovedì 11 ottobre 2012 13:45:31 UTC+2, curiouslearn ha scritto:
This is perhaps a problem with google groups. Only reasons I am saying
I recently revised some of the cache and gae_memcache login.
I believe this will result in faster times on GAE. cache.ram and cache.disk
point it gae_memcache automatically.
Instead of a memcache connection per request, there is only one per process
(and i am assuming the GAE memcache client
You can try:
db.executesql('LOCK TABLE tablename READ;')
http://aarklondatabasetrivia.blogspot.com/2009/04/how-to-lock-and-unlock-tables-in-mysql.html
On Thursday, 11 October 2012 01:44:14 UTC-5, vince wrote:
can i lock a table as readonly during the transaction? the case is i need
to
Is it possible you have a custom validator?
is should have a IS_DATE validator (default). It is the validator that maps
request.vars.date into form.vars.date and performs the conversion.
On Thursday, 11 October 2012 06:30:46 UTC-5, David Sorrentino wrote:
Changed the name of the field from
(1, 99, 4, datetime.datetime(2011, 12, 14, 14, 46, 14), 'stable') is one
year old. This error and my others have been fixed. You really need to
upgrade. ;-)
On Thursday, 11 October 2012 06:36:57 UTC-5, Hassan Alnatour wrote:
I dont understand the error anyone can help me with it ?
regards,
I double checked and the is_valid_ip_address in trunk is the same as the
one you have.
I do not know why that fails on dotcloud. You may want to comment these two
lines in main:
if not is_valid_ip_address(client):
raise HTTP(400,Bad Request (request.client=%s) % client)
Not a big
I see the problem. MARKMIN as a markup language does not assume you have
web2py nor web2py.js. It allows you to expose any function you want such as
@{funcname:parameters} but you have to define the function. You can do:
def component(text):
items = text.split('/')
controller, function,
this only happened with a previous experimental trunk version. You should
not have this problem with latest trunk ot with the 9-13-2012 stable.
On Wednesday, 10 October 2012 22:06:09 UTC-5, Adi wrote:
Not sure if this is of any help to fix something, but for me it happens
when i'm fiddling
I confirm the problem, also with WinRAR and 7zip.
Somehow the files:
web2py\applications\examples\static\epydoc\web2py.gluon.sqlhtml.ExporterTSV-class.html
web2py\applications\examples\static\epydoc\web2py.gluon.sqlhtml.ExporterHtml-class.html
Hello,
Is it possible that scientific notation feature at insertion is broken in
2.0.9?
Also, can I restore scientific notation on update and select (grid) ?
Thanks
Richard
--
Sorry,
I've noticed now that a Windows version does not exist for the trunk (I've
tried with the source). So, the problem is still there.
Nico
--
Using OracleDB, how do I generate the raw SQL of my database schema?
The documentation only shows how to generate SQL from selects, inserts
or deletes: http://web2py.com/books/default/chapter/29/06#Generating-raw-sql
Nothing is mentioned regarding getting the `CREATE TABLE` and related
schema
unicodedata module is accessible in a view when i test code directly from
an application, but get the error when run the same code from scheduler. I
can move the code up to a model (db_scheduler), but just wanted to know if
imports from models should be visible to Views when run through
Yes. The notation is not supported by the validator. Should it be?
On Thursday, 11 October 2012 09:47:15 UTC-5, Richard wrote:
Hello,
Is it possible that scientific notation feature at insertion is broken in
2.0.9?
Also, can I restore scientific notation on update and select (grid) ?
I have no idea why. This is artifact of the zip utility on linux. The file
definitively only exists once in the source.
I am not sure how to fix it. Perhaps I should upgrade the os and get a new
zip version.
Massimo
On Thursday, 11 October 2012 09:46:45 UTC-5, Nico Zanferrari wrote:
I
Hello,
I have component tools, they serve to show table build from a query with
redirect link. I place them in differents places in my app and depending of
the place I would like to be able to pass max number of rows to the
underling query used to build the table showed in the component. So I
It was working in the pass was at a feature or someting experimental?
Or should I have to make my own widget/validator for that? And if so, is
there something to start with?
Thanks
Richard
On Thu, Oct 11, 2012 at 12:08 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Yes. The
Try:
db._adapter.create_table(db.tablename,fake_migrate=True)
On Thursday, 11 October 2012 10:32:27 UTC-5, Alec Taylor wrote:
Using OracleDB, how do I generate the raw SQL of my database schema?
The documentation only shows how to generate SQL from selects, inserts
or deletes:
Where is unicodedata.py located?
On Thursday, 11 October 2012 10:56:50 UTC-5, Adi wrote:
unicodedata module is accessible in a view when i test code directly from
an application, but get the error when run the same code from scheduler. I
can move the code up to a model (db_scheduler), but
I'd go for checking for howmanyrecord = -1 and in your controller
if howmanyrecord == '-1':
limitby = False
else:
limitby = (int(startrecord), int(howmanyrecord ))
return db(yourquery).select(limitby=limitby)
On Thursday, October 11, 2012 6:13:55 PM UTC+2, Richard wrote:
Hello,
Ok,
In this case, I would test the startrecord :
if nmaxrecords == '-1':
limitby=0
elif nminrecords:
limitby=(int(nminrecords), int(nmaxrecords))
else:
limitby=(0, int(nmaxrecords))
Since if it is not passed the vars will be empty and raise nonetype error.
Must test also nmaxrecords :
if nmaxrecords is None or nmaxrecords == '-1':
limitby=0
elif nminrecords:
limitby=(int(nminrecords), int(nmaxrecords))
else:
limitby=(0, int(nmaxrecords))
On Thu, Oct 11, 2012 at 12:52 PM, Richard ml.richard.vez...@gmail.comwrote:
I think this happened on 2.0.9 stable -- I will verify and let you know.
On Thursday, October 11, 2012 9:46:48 AM UTC-4, Massimo Di Pierro wrote:
this only happened with a previous experimental trunk version. You should
not have this problem with latest trunk ot with the 9-13-2012 stable.
this is the one that comes from python:
http://docs.python.org/library/unicodedata.html
(using it to clean out trademark and other symbols in order to send text as
email)
On Thursday, October 11, 2012 12:18:19 PM UTC-4, Massimo Di Pierro wrote:
Where is unicodedata.py located?
On
Hello,
We need to link to a ldp database in web2py. All the data is in ldp
format and we want to use that data in web2py.How to do it?thanks :)
--
I'm using a custom form, but no custom validators.
Do you need some additional information?
Cheers,
David
On 11 October 2012 15:34, Massimo Di Pierro massimo.dipie...@gmail.comwrote:
Is it possible you have a custom validator?
is should have a IS_DATE validator (default). It is the
it's odd, but seems unrelated to scheduler. To help on further
investigation, I managed to reproduce in shell.
Append to standard db.py
import unicodedata
def testfunction():
return response.render('message.html', context=dict())
then, create views/message.html
{{=XML('p%s/p' %
as you wish. the point is assigning a limitby=False if you don't want to
use limitby at all.
The code on dal.py sets limitby = False by default, so select() and
select(limitby=False) have the exact same output.
On Thursday, October 11, 2012 6:59:52 PM UTC+2, Richard wrote:
Must test also
Thanks Niphlod!
Richard
On Thu, Oct 11, 2012 at 3:23 PM, Niphlod niph...@gmail.com wrote:
as you wish. the point is assigning a limitby=False if you don't want to
use limitby at all.
The code on dal.py sets limitby = False by default, so select() and
select(limitby=False) have the exact
thank you for the log.
I'm trying to reproduce, wrapping my head around this.
you say x.companyname is an utf8 value. Then the problem goes away if you
do x.companyname.encode('utf8') . so basically the point is that if you
print unicode data, the error shows up, while printing strings it's
PS: I tested this also on WinXp with web2py.exe Version 2.0.9 (2012-09-13
23:51:30) stable (current default download for windows). No errors at all.
--
I saw some 2+ year old thread in using twisted w/ web2py. The answer seemed
to be maybe with a but
Ide like to use web2py to build the front to a real time app built on
twisted. Has anyone done this recently or can provide some guidance ?
--
El jueves, 11 de octubre de 2012 10:45:36 UTC-3, Massimo Di Pierro escribió:
I see the problem. MARKMIN as a markup language does not assume you have
web2py nor web2py.js. It allows you to expose any function you want such as
@{funcname:parameters} but you have to define the function. You
Got i!
The problem is not present if you unzip it on Linux. It is simple due to
name collision - inside the ZIP there are 3 couples files that cannot exist
for Windows on the same directory:
web2py\applications\examples\static\epydoc\web2py.gluon.sqlhtml.ExporterTsv-class.html
Do you need to access the ldb or would a conversion from ldb to sqlite be
suffcient?
Perhaps this module can be useful: http://pypi.python.org/pypi/ldb/1.0
On Thursday, 11 October 2012 12:56:04 UTC-5, qwer qwer wrote:
Hello,
We need to link to a ldp database in web2py. All the data is
We need to see some of the code. Somehow the validator is not called.
On Thursday, 11 October 2012 13:32:40 UTC-5, David Sorrentino wrote:
I'm using a custom form, but no custom validators.
Do you need some additional information?
Cheers,
David
On 11 October 2012 15:34, Massimo Di Pierro
There is a known problem with the custom_import, it does not work when
import mymodule is called from the shell. Perhaps this is also a problem
with the scheduler. It is in my todo list to fix it by the end of the week.
On Thursday, 11 October 2012 14:20:37 UTC-5, Niphlod wrote:
it's odd, but
I understand that twisted as a wsgi interface. Web2py should work well with
it.
On Thursday, 11 October 2012 15:06:22 UTC-5, Nomad wrote:
I saw some 2+ year old thread in using twisted w/ web2py. The answer
seemed to be maybe with a but
Ide like to use web2py to build the front to a real
Good catch. Accidentally they could not be right since Python is case
sensitive but you are right. There is some junk in that folder. I have
removed it and rebuilt-the nightly built. Can you please try it again?
Massimo
On Thursday, 11 October 2012 15:28:29 UTC-5, Nico Zanferrari wrote:
Got
Hello.
I have a problem with code and decode chars. This is my code:
# coding: utf8
result = cdb.executesql(SELECT * FROM laptops)
for reg in result:
text = (Número de serie: +reg[0]).decode(utf8).encode(latin1)
And this is the error: *(N\xc3\xbamero de serie:
Tried 2.09 nightly build on a completely different (redhat) server and
still getting redirect, while post works as expected on a local rocket.
Any hint where to look for a problem please?
using:
curl --user webserv...@domain.com:pass -d FirstName=Tim5LastName=Jsonhttp
Is it possible to re-use an variable with an value from a function on the
controller in the view?
What I'm trying to accomplish is, I have string with a lot of text, and I'm
only want to present a few words or part of this text in view. I manage to
do this with a python script together with an
Hey,
I want to call a function that I defined in the Controller from javascript
via AJAX. When the function returns a string everything is perfect, but
when it returns
a dict, I get always this error:
*404 - NOT FOUND
web2py_error:invalid view (default/getValuesFromFile.html)*
My code looks
You have data in the database that is binary but not unicode. What do you
want to do with it? You cannot decode('utf8'). Perhaps they already in
latin1?
On Thursday, 11 October 2012 06:47:35 UTC-5, Manu Mora wrote:
Hello.
I have a problem with code and decode chars. This is my code:
#
Please open a ticket about this and I will look in detail asap.
On Thursday, 11 October 2012 09:44:04 UTC-5, Adi wrote:
Tried 2.09 nightly build on a completely different (redhat) server and
still getting redirect, while post works as expected on a local rocket.
Any hint where to look for
Ok, look into that when you can. Just notice that the run_view_in can't
see the unicodedata module, but in shell environment unicodedata is
present, otherwise this
unicodedata.normalize('NFKD', u'hi')
u'hi'
would have raised an exception
On Thursday, October 11, 2012 10:46:17 PM UTC+2,
2012/10/11 Massimo Di Pierro massimo.dipie...@gmail.com
Good catch. Accidentally they could not be right since Python is case
sensitive but you are right. There is some junk in that folder. I have
removed it and rebuilt-the nightly built. Can you please try it again?
Massimo
Yes, I
Not a problem! ;)
Here the *model*:
db.define_table('news',
Field('title', 'string'),
Field('body', 'text'),
Field('date_local', 'datetime'),
Field('date_utc', 'datetime', readable=False, writable=False)
)
db.news.title.requires = [IS_NOT_EMPTY(), IS_NOT_IN_DB(db,
Sorry this took forever. This is now fixed.
On Tuesday, 2 October 2012 21:51:46 UTC-5, Márcio wrote:
Massimo, help please.
--
It really is a great job and I think it definitely will be incorporated as
a standard interface for administration. A suggestion is to make a historic
recording of data.
Ovidio Marinho Falcao Neto
Web Developer
ovidio...@gmail.com
Thanks Massimo for looking into this.
ticket opened:
http://code.google.com/p/web2py/issues/detail?id=1080thanks=1080ts=1349992678
On Thu, Oct 11, 2012 at 5:05 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Please open a ticket about this and I will look in detail asap.
On
Thank you!
On Wednesday, October 10, 2012 8:54:16 PM UTC-5, Massimo Di Pierro wrote:
This has already been fixed in trunk and the nightly built. file was
replaced by filename.
On Wednesday, 10 October 2012 19:18:24 UTC-5, Bill Thayer wrote:
This question should show my lack of Python
you're overridding the default validator (IS_DATE*) with IS_NOT_EMPTY
replacing this line
db.news.date_local.requires = IS_NOT_EMPTY()
with
db.news.date_local.requires.append(IS_NOT_EMPTY())
should work.
--
Just running that in Python I get an error.
(Número de serie: +100).decode(utf8).encode(latin1)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xfa in position 1:
invalid start byte
I noticed that first line:
#coding: utf8
ú - this is a latin1 character, so you have an invalid python
Well, what are you seeing when you go to the url yourself?
On Thursday, October 11, 2012 2:22:03 AM UTC-7, Timo W wrote:
Hey,
I want to call a function that I defined in the Controller from javascript
via AJAX. When the function returns a string everything is perfect, but
when it returns
Thanks, Massimo.
It works with the two lines commented out.
I would love to help debug this, but unfortunately do not have the
knowledge to do so. Right now, I do not even know how to see
server errors for which ticket is not generated. Anyhow, I will read up the
manual and see if I can learn
Timo,
I don't know what the problem is. However, I do it in the following manner
and that works well:
(i) In $.ajax specify that the datatype is json (dataType: 'json')
(ii) In your controllers file
import simplejson
and, write
def getValuesFromFile():
[...]
return
I discovered Editra Editor and found it pleasant to use and seemingly a
complete replacement for Komodo Edit (if anyone uses that). Comes with
various useful plugins as well. Fyi.
http://editra.org/
http://editra.org/plugins
--
I am using this editor as an alternative to sublime-text on a poor netbook.
Sublime uses a lot of memory and Editra runs very well on poor machines.
On Thu, Oct 11, 2012 at 9:35 PM, Luther Goh Lu Feng elf...@yahoo.comwrote:
I discovered Editra Editor and found it pleasant to use and seemingly a
just one response is enough...
On Thursday, October 11, 2012 10:37:49 AM UTC+3, apps in tables wrote:
Hi All,
I am studying the hosting of photo application (possibly having big number
of photos).
100,000 photo * 1 MB = 100 GB
Any recommendations...
Ashraf
--
more details please!
Is you app develop with web2py?
Where are you hosting?
Are you using default upload feature of web2py-DAL?
--
Is you app develop with web2py?
yes
Where are you hosting?
This is my main question
Are you using default upload feature of web2py-DAL?
yes
--
Hosting only depends on how much you want to pay for it, you use Amazon S3
which is widely used for image cdns, You can pick any VPS which offers
backups (Linode, Rackspace etc), alternativelly you can use DropBox to host
you image and them retrieve trhough API (web2py supports it).
My
Just pulled now. Fixed! Great thanks.
On Thursday, October 11, 2012 6:20:45 AM UTC+13, Massimo Di Pierro wrote:
Can you try again? I think I fixed this in trunk.
On Tuesday, 2 October 2012 22:08:58 UTC-5, Matt wrote:
Just testing it now, Getting an error on GAE + CloudSQL:
File
One thing you can do is email the exact ipv6 IP that does not pass
validation. I check it on my machine.
On Thursday, 11 October 2012 19:06:50 UTC-5, curiouslearn wrote:
Thanks, Massimo.
It works with the two lines commented out.
I would love to help debug this, but unfortunately do not
Hi,
the main question is that is it possible to authentication against
Google Apps if the application is not on GAE?
ImportError: No module named
gluon.contrib.login_methods.gae_google_account
I found out why I'm getting this. Because the file google.appengine.api
is missing. This
82 matches
Mail list logo