I have recorded what might be a similar problem. If I run the application
using the rocket server where the client browser and server are on the same
LAN the application works. If I have the client come in from another
location over a VPN I get partial pages. The Safari archive in the failure
I just tried, no problem. Are you behind a proxy?
Ed,
Sorry, I looked at the URL in your second message www.box.com and that
works. The URL in your first message to a specific shared file gives me a
404 response too.
This is a file sharing site like dropbox so it appears the file owner has
removed it.
I tried a few of the web page archives
I am trying to understand why the socket timeout would be set so low at 1
second as a default.
I believe this change is the solution to a problem I have been chasing off
and on time permitting where the pages won't render properly when using the
rocket server with a browser over the WAN.
It looks like elfinder would be a very nice implementation of a file
manipulation area open to users for an application I am working on.
I found this discussion about elfinder which is over a year old
https://groups.google.com/d/topic/web2py/Ove0jTJn_Vk/discussion
where in the last posting a
If you are using superfish menus in views/layout.html hee is what I did.
I changed
script type=text/javascript
jQuery(document).ready(function(){
jQuery('ul.sf-menu').superfish();});
/script
to be
script type=text/javascript
Oops sorry forgot a detail, I did this a while back
I have a simple mapping of top level menu item to controller name so this
works for me because of how it is organized. This allows me to remove
functions from the application depending on where it is installed. Some
clients don't use every
+1 or more
I looked at several Python frameworks 1.5 years ago. Half of them are dead
projects now glad I wasn't on any of those bandwagons. It came down to
Web2py and Django and every time I looked at Django I went back to Web2py
because it felt so well designed and set up for getting things
Ran application I am working on no problems.
The welcome application seems to pull in some adware. Firebug opens in
Firefox with a problem loading sm6.html saying _gat is not defined. I
believe this is coming from the Share item in the top menu.
The jQuery team has released 1.6.4 to fix a bug
I was testing trunk, ran the Welcome application and the Firebug debugger
got a script error
_gat not defined in file http://static.addtoany.com/menu/sm5.html line 1.
Checking the DOM load of the index page I see an iframe
iframe id=a2apage_sm_ifr width=1 height=1 frameborder=0 style=border:
I didn't replace the one in web2py, I just use the jQueryUI one by including
the necessary CSS and JS files and placing the files in static/js and
static/css after downloading a custom build from jQueryUI
In the view where it is needed I add these lines before the extend
'layout.html' line
In this situation look in the application/databases directory for a file with
the table name as part of the file name. Remove or move the file somewhere else
and then restart the web2py server. The table should now reappear and will be
empty.
You also need to consider the database type used by the application for the
model. The SQLite database has a transaction lock which will cause the
application to look like it is single threaded if the database is held in a
transaction pending state while the background work is performed.
Run 2 copies of web2py, one for the script and the other for the web site.
If the database is SQLite you will end up with blocking problems if the
background task takes too long.
You should probably check permissions and ACLs all the way up the directory
tree to the root of the drive. It is possible to apply an ACL in an upper
level directory and with a check box option cause that permission to apply
recursively to the whole file tree below.
I use PostgreSQL as well with great success. Another thing to keep in mind
is if you restart the database server and are using apache with web2py then
you should restart apache as well. The reason is the connection pool if used
as a number 0 in the DAL() connection statement will have stale
You need to have the AJAX URL formed in a way that invokes a controller.
eg /application_name/controller_name/function_name/arg0/arg1 .
and include the variable(s) you want to send back. The variables can be
either addition items after the function as above where they show up as args
or if
The code running this is in gluon/newcron.py
From your stack trace you are using hard cron which is a class at line 44.
It runs launch once a minute
This runs crondance which puts a wrapper on the tasks that should be run
adding web2py run line parameters if * or ** is at the beginning of the
Sounds like some kind of race condition between the cron scripts because it
doesn't happen every time. Is there any chance the 3 cron scripts are
dependent on each other in some way such as a file passed between or sharing
a database. If there is any relationship between the cron scripts would
Maybe one possibility is if your code has classes with a __del__ method in
them, Massimo would have better perspective on if this is a possibility. If
a class with this method is involved in a circular reference the garbage
collector cannot clean it up because of uncertainty of execution of the
If you started with a copy of the Welcome app did you change the database
name? If both apps have the same database URL originally defined in the
Welcome app in file models/db.py they will share tables.
In response.menu each item of the list is a 4 element tuple. The second
element of tuple can be True or False to represent that item is active. This
causes teh MENU class in gluon/html.py to attach class=web2py-menu-active
to the li tag associated with that menu item.
That class is not
Oops I found it, simple once you know how. In layout.html do the following
Change
jQuery('ul.sf-menu').superfish();});
To
jQuery('ul.sf-menu').superfish({pathClass:
'web2py-menu-active'});});
This will allow suckerfish to use the class added to the active menu item by
the
I would have great difficulty recommending Word as an editor for working
with HTML because of all the things it does under the covers. Not trying to
stir up flames, just trying to make your life easier. As a word processor
Word is okay.
Unless step 6 is reached and completed if the client closed then I would
expect the database server to detect the closed connection and rollback on
its own since there is no way to recover the state built on that connection
or if the database server is restarted then the database server should
Are you returning enough data to cause the system to go into paging - check
the system monitoring tools, not sure what you are running on, to see if
there is a large amount of VM activity involving paging to disk while this
is running. That would really kill performance. The entire data
I agree jQueryUI should not be included as a default. I use jQueryUI but
only pull it in for the views that need it. It is one css and one js.
The other thing to remember is if you go to the jQueryUI download page the
form allows you to build a custom version specific to the features in use
IMHO it depends on a number of things.
Using groups and memberships is good if the flags are meant to indicate an
ability to do something on the system because there are decorators and
functions to test for having the attribute. You can then decorate a function
or use a has_ test to
My application is working with model files under a subdirectory == the
controller name.
I should have said using version 1.96.4 as verification requested by Jay.
BTW controller specific models were not introduced until 1.96.1
On Wednesday, 8 June 2011 13:37:11 UTC-7, ron_m wrote:
My application is working with model files under a subdirectory == the
controller name.
On my Ubuntu 10.04 system /dev/urandom has mode 666 which means read and
write for everyone. If it is not writeable on Webfaction for others then it
is either a policy for a different Linux distribution or a policy of
Webfaction.
The idea behind writing to /dev/urandom is to seed the random
To add some more, on Ubuntu and according to man urandom all major Linux
distributions since 2000 the file /etc/init.d/urandom saves the random
number pool into a seed file and restores it on startup by writing it back
to /dev/urandom.
Verified fixed in 1.96.2
You need to put the define_table in a model file or type it in again. You
are probably better off using a command line shell, see teh link
https://groups.google.com/d/topic/web2py/AzCFS8X7oLc/discussion
The post by Yarko is the one you want to look at, sorry
I figured out the problem. The Javascript generated looks like this:
web2py_trap_form('('/app/default/testajax.load',)','c831268503949');
which is illegal because the single quotes around the URL terminate the
single quotes of the first parameter for web2py_trap_form
It looks like a string '('
If the id in the link the 11 or 12 is then used to reference an id in the
database which is an id field in the DAL definition sense then the database
engine will usually block you. The id field at the database level is meant
to be a non repeating key so reuse of an id numeric value is
If you have a record version number field in the table then you can read it
for the record of interest. When you go to update the record you specify the
expected version number in the update equivalent to the SQL WHERE along with
the field id so if the version number has been incremented by
Good for you on the course completion. There is a lot to learn especially if
you have never done web development before of this type. For web development
many people do HTML/CSS and to a lesser degree Javascript only so the server
only pushes pages that are pre-canned. I worked with Java for
Glad to help, wish you success on your project.
os.path.join takes into account the path separation character - UNIX = '/'
Windows = '\' which is why you should use it for when you want to run on
both system types even if you don't expect to right now.
os.path.exists internally does a stat() of the file to determine if it
exists. There are
A possible idea, each email insert into a table. When the cron job wakes up
have it read X number of emails with the smallest ID value from the table
and process them. Delete the row as each one is completed.
I run the same version of Ubuntu, no problems with seeing or generating
tickets when I don't get it quite right in the code. Check the permissions
on the errors directory for you app?
The errors in views are from when the Python code runs which is after
extend, include and translation of HTML
I backed up my database, made a copy of the application databases directory,
hg pull and hg update on trunk.
Got this traceback right away
Traceback (most recent call last):
File /home/camcentral/Dev/web2py-hg/gluon/restricted.py, line 184, in
restricted
exec ccode in environment
File
query isn't set in the last elif branch before the else
I added query = None after line 668 which is the line containing
for key in keys:
just before the line
if not key in sql_fields_old:
and got rid of all the query = None statements in the if elif branches plus
got rid of the else branch.
I am happy to report this allowed the application to
Looks like you get a ticket trying to display the application error ticket.
I had that once but I was debugging something in trunk that was broken at
the time.
You mentioned you have a fully and properly working debain version. I
believe it is legit to move the files under errors in your
If you go to the web2py server admin app e.g. http://127.0.0.1:8000/admin
and login you should see the name of the app containing the service and an
errors link after the name. Click that and you will see the errors page and
be able to see the stack trace.
When running as a Python process you
I found out the DAEMON_ARGS change should not be applied. The start branch
of the script needs both pid file options.
The --pidfile option prevents start-stop-daemon from behaving like killall
as mentioned in the Description section of the start-stop-daemon man page.
This will allow
a href=javascript:void(history.go(-1))img src={{URL('static',
)}}/a
puts an image link that simulates the back button on the page. You could
convert it to button and use the jQuery alternative
Too much of a hack? The web2py framework is very good with history
integration.
Ah C, pointers and pointers to pointers for **
I used to like pointers in C but then I used to work on operating systems
written in assembler during my early years in computers (70s, early 80s).
Results in a different mindset.
I was thinking of the values you would ultimately store in the database and
what you might use them for eventually. If you want to use these times in a
SQL expression in the WHERE clause through direct SQL or through DAL
expressions and search across multiple users for something created between
scripts/web2py.ubuntu.sh has a problem with starting web2py sometimes. The
symptom is the init script is run with a start option but web2py does not
start.
The cause is if the start-stop-daemon program used to start python sees
another copy of python running it will refuse to start the copy
Great, I was doing this manually, this really helps codify the procedure.
The export_to_csv_file and import_from_csv_file routines are the magic with
how they fix up all the foreign keys to match the new primary key values.
Actually it isn't that obvious. In Python the datetime class by default is
not time zone aware. If you have users coming from multiple time zones the
best universal way to handle this is store the time in UTC which the
datetime class has a method for datetime.utcnow(). This is how UNIX does it
I examined the TCP traffic with Wireshark and could not see the actual
requests go out to the server. I am beginning to believe this is a Firebug
instrumentation problem. I would believe the Wireshark trace, it had no
filters and I removed as much traffic as possible on the interface and all I
Martin,
Thanks for the suggestion, the analyze function shows 200 for the status but
that it loaded from cache which is consistent with observation using
Wireshark. This tool is also a much more direct approach to increasing
performance. It also pointed out that the items getting the 200 do not
Host is Ubuntu 10.04, web2py is 1.95.1
I use Firefox 3.6.17 from the Ubuntu distribution
Added the Firebug plugin.
Running on the rocket built in server port 8000 if I enable the Net tab of
Firebug
Clicking around on the application buttons all the static CSS and Javascript
resources such as
In the core chapter of the book I found this:
In the above example, both request.args[i] and request.args(i) can be used
to retrieve the i-th element of the request.args, but while the former
raises an exception if the list does not have such an index, the latter
returns None in this case.
I
If the second parameter on local_import is True it will reload each time the
statement is executed. Otherwise it retains the first local_import until
server restart.
Pricing by an accountant, no offence to accountants - hmm 1000 people that's
only $15/year per person I am sure is someone's way of thinking. I might see
a mid size company going for it if they wanted to outsource authentication.
Too much for my pockets. :-)
Ran across this in a blog, written in Python,
http://mitmproxy.org/
from the web page:
*mitmproxy* is an SSL-capable, intercepting HTTP proxy. It provides a
console interface that allows traffic flows to be inspected and edited on
the fly.
*mitmdump* is the command-line version of
In a typical view file you have to think about where the execution will
occur.
The Python code in the view will run on the server as part of the page
generation process, the page is shipped out to the user's browser as the
response and will be HTML and Javascript and the Javascript that
Please don't multiple post the same question. I have seen this question
posed 3 times in the last day and it has been answered by several people in
the different instances of the question. If you don't get an answer right
away it is because:
1) Everyone that might want to answer is getting 3
I just did with 1.95.1 and the auth_user table is empty. I am not using
powerpac tools, it is a plain install from the web2py_src.zip file download.
I would just download the web2py_src.zip and unpack it in a different
directory and then run it from that directory
python web2py.py
do the simple app in admin and check the result.
I believe the simple app builder is just an unpack and rename of the welcome
app - the w2p file in the base of
email of a.a.com is not a valid email address according to your code.
I am not sure if there is any validation during login
The duplicate .table files from what I can tell come from using different
database connection strings. I haven't looked for the code but I do know if
I change the database type, user name etc in the DAL() connection string
parameter it appears to generate a hash code from the string and prefix
The web2py request work flow runs the model files first, then the
controller, then renders the view. I had a similar problem, the only way I
could figure out how to change the menu after the model files have run was
to add a menu update function to the model and call it from the controller
Try changing
name=window.open(url,name,'toolbar=yes,location=yes,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=width,height=height');
to have the variables width and height not inside the string literal quotes,
something like this
I ran my application and did not see any problems. I am over a PostgreSQL
database. I likely did not exercise any new features, I have not touched the
code in a week or more - working on other things right now.
Doesn't look good for Python support in Netbeans 7 according to this
https://groups.google.com/forum/#!topic/comp.lang.python/JQQWJCARh9U
The _select is a nested select - the one in the second half of the WHERE
clause that Christian wrote out for the SQL equivalent.
But the _select needs to return exactly one column, try changing _select()
to _select(db.user_tags.tag)
There is some discussion in the manual under the belongs
First item on Blender page you reference, big discussion on auto import bpy.
All the arguments look familiar. :-)
In UNIX for text mode output the default setting in the serial driver is to
map the standard UNIX EOL which is \n to \r\n
Unix input also maps \r to \n
The Linux man page is
man 4 tty_ioctl
for more than you will likely will want to know
In Windows the file must contain the \r\n which is the
Are you using IE as the browser? I had a similar problem show up with video
displayed in an ActiveX control but it worked fine in anything but IE. In
the end it was presumed this was an IE issue with CSS based menu posting so
I went away from pull down submenus with having to support IE8.
Agreed, I looked at all the usual suspects for a Python framework and came
to the conclusion web2py was the best integrated of any and represented the
path of least resistance to getting work done with well chosen defaults in
the design and a well defined way of implementing applications. The
Hi Jason
This line
response.menu += [(T('My Conferences'), False,
URL('default','my_conferences'), [
users_conferences_list
])]
I think should be
response.menu += [(T('My Conferences'), False,
URL('default','my_conferences'),
Something is odd, looking at your traceback dal.py line 3357 in my copy of
trunk updated a minute ago is in the last line of the initializer code for
ADAPTERS
Hmm didn't know Rails was a Python web framework, according to Garbaginator
it is. :-)
Check out gmail motion on Google home page
I would like one, location Vancouver Canada for the postage calculation. Can
use Paypal if you like.
It is in web2py-developers
Sorry should have put in link for interest of others, the post on the DAL
shell by Kevin is in web2py-developers at
https://groups.google.com/forum/?pli=1#!topic/web2py-developers/AbBiV8hoLIw
Maybe they are just jealous they never thought of what you have done before
you made it a reality with web2py.
I presume you know enough Python to be able to open these files, read and
parse the content and come up with a data structure such as a dict of the
name value pairs in the file.
In your own standalone program you can use the DAL by itself
from gluon/dal import DAL, Field
then you can connect
Looks great, thanks for the addition. I worked on this a bit when it first
was added but since I don't use mysql any more in the application I am
working on and have a high workload I never got any further.
I moved from MySQL to PostgreSQL a few months ago with a small database but
with a significant number of many to many relations as well as one to many.
Here is what I did:
Exported the data from MySQL using the export_to_csv_file call from the
shell with the model activated which pushes all
You should only get a portalocker.LockException if the no blocking option is
set on the lock attempt which it is not the case in the original web2py
code.
However, the exception handler inside portalocker.lock will re-raise any
exception if it is not IOError for Errno 11
It would be very
Type in the terminal window
echo $PATH
upper lower case is important. It should have /bin between colon characters
somewhere
or try
/bin/ls
as a command.
Either you PATH environment is messed up or some important command files are
missing from the /bin directory.
The symptoms look exactly like a user I had a problem with logging into my
application but for them cookies were disabled, re-enabling cookies fixed
it.
Firefox cookie settings are a little obscure, here is a web reference
I use this in a portion of the views coded for what I am working on and it
works for me. I just ran the page with the test true and again with the test
false and I get the include file content inside the {{if condition:}} branch
if the condition is True and the html in the {{else:} branch if
That is a symlink creation so the assumption if using that command is
wsgihandler.py exists in the current directory and you are creating a
symbolic link named wsgi.py which points to wsgihandler.py.
If you use ls while logged in on the server do you see wsgihandler.py, run
the ls command. If
In the file gluon/tools.py line 808 in trunk the Auth class __init__ method
you will find these lines
if auth and auth.last_visit and auth.last_visit\
+ datetime.timedelta(days=0, seconds=auth.expiration)\
request.now:
self.user = auth.user
I am guessing some more because I didn't trace the code but I think
auth.user eventually gets set in login_bare without setting auth.user_id but
then do standalone apps actually login?
I could only find 3 places where self.user_id is used in the class, the 2
places in the if else and as a test
+1
Thanks, it is easy to see how the default parameter gets changed with that
example since the binding passes back outside the function through the
return value, gets assigned to another variable and then the container
contents modified through that assignment.
RSS (Resident Set Size) is a closer approximation of actual physical memory
consumed by a process. VSZ includes shared libraries and anything else
required to be mapped in to make the process complete but shared libraries
are not in physical memory more than once for all processes except the
Depending on the system type the memory doesn't get released. It is rare
that a malloc implementation calls sbreak with a smaller number than the
previous call which is what you are looking for. If you have a program that
consumes say 100 MB to do some initialization and then frees all those
I tested my app with version 1.92.1 and it works. I then copied it to trunk
and I can no longer connect to the PostgreSQL database I use.
I looked at the code in dal.py for the PostgreSQL adapter and driver_args
defaults to empty dict {}, adding some debug print code shows it is set on
the
The latest web2py trunk jQuery is 1.5.1
If using a buttonset from the jQueryUI Button widget the Javascript trips on
the label tag 'for' attribute and throws an error leaving the buttonset as a
set of radio boxes instead of making them into buttons. This can be seen in
the jQueryUI Button
1 - 100 of 285 matches
Mail list logo