Over the weekend I was working on and exploring the possibility of using
generateDS.py http://www.rexx.com/~dkuhlman/generateDS.html to create
python objects for an xsd file and modifyiing its included django script to
instead create the web2py.metadata file that comes with the appadmin
Hi Alan. Seeing your code must have helped because I did get it to run.
The following shows a demo script with functions to upload a file and
download a file utilizing a table containing a blob field. It worked twice
on a pdf for me. Note that I had to change the filename type from 'upload'
Hi Alan,
Just now getting back to this days later...
Your code also threw the same error so before I un-commented the if
statements in dal.py I added some print statements and can see the list of
fields, then the name of the filename field as 'filename' followed by
So I just replaced the first if statement with 'if True:' so that the code
would execute. Looks like a unicode object does not have an attribute
'file'
(InteractiveConsole)
import test_tamoto_rpc as trpc
trpc.upload_file()
C:\Users\bthayer\Documents\car\carfiles.txt
wiki_media.id
Yes. That is what I meant.
On Saturday, February 2, 2013 1:49:55 PM UTC-6, Alan Etkin wrote:
Your code also threw the same error so before I un-commented the if
statements in dal.py I added some print statements
Did you try the store command as I posted it (passing pathname and
filename)
I'll mention it on my Dallas Python mailing list too. Don't know how many
web2py users we have in Texas though.
--
---
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
Hi Allen,
Yes the book has the example as written because I am uploading directly to
the database. Otherwise I get an error that store requires a value for
uploadfolder.
Sorry but I've been looking for how t temporarily not let the dal catch the
error. I tried running my app with the -S
'
ADAPTERS['oracle'] = MyOracleAdapter
On Sunday, 27 January 2013 21:22:38 UTC-6, Bill Thayer wrote:
Hello,
I am borrowing code from the CategoryPlugin
slicehttp://www.web2pyslices.com/slice/show/1354/hierarchical-category-treeand
ran into a unique Oracle error but I suspect that the insert
I think I figured this one out so I am posting the solution.
On the manages wiki_pages page from the manage pages memu item, I would
click on a media button and get the error below.
Turns out that in the course of testing my application I had uploaded files
without a title and web2py does not
I am attempting to write a function that will eventually go in to a
migration script to upload legacy data files. As you can see I use the DAL
and define the wiki_media table. The function below looks just like the
example in the
I defined WEB2PY_HOME in my environment variables and then added
%WEB2PY_HOME% to my path system variable. This way I can change it's value
depending on the version I am developing on at the time.
-Bill
On Monday, January 28, 2013 9:49:12 AM UTC-6, Alec Taylor wrote:
On Tue, Jan 29, 2013 at
Hello,
I am borrowing code from the CategoryPlugin
slicehttp://www.web2pyslices.com/slice/show/1354/hierarchical-category-treeand
ran into a unique Oracle error but I suspect that the insert command is
not inserting by named fields. From my stack trace the argument below shows
the columns in
Nice!
Looking for loads_json in serializers.py; Found custom_json instead that
takes an object, checks it for a custom attribute and a callable. then
returns the objects custom_json() method...[I call it a method but in
Python I guess it's an attribute?]...Basically, before calling json() I
Yes. working now. Thanks.
On Friday, January 18, 2013 9:28:27 AM UTC-6, Alan Etkin wrote:
Working on trying out the json support but db won't get past this error.
Fixed in trunk. Please check it works for you (it did for me)
--
Hi Alan,
Thank you for your work on the json data type. (Sorry for getting your name
wrong in my other post). These discussions are great for thinking through
my problem.
Yes I would need to post json data into the database and also search the
data, display and edit it also. My app is just
Thank you,
My revised function looks like this:
def json_parameters(param_names):
takes an array of parameter names which are attributes to a design
cell
then looks up the default value and unit in the attributes table
and returns an array of json dictionary objects to be inserted
Borrowing code from SQLFORM.dictform I think I'm close to rendering nested
dicts dumped from json:
The browser is simply writing a bunch of the
gluon.html.(SPAN|FIELDSET)objects. I did try to return xml(form) but
received an error saying:
Generator expression must be parenthesized if not sole
On Sunday, January 20, 2013 11:52:59 PM UTC-6, Bill Thayer wrote:
Borrowing code from SQLFORM.dictform I think I'm close to rendering nested
dicts dumped from json:
The browser is simply writing a bunch of the
gluon.html.(SPAN|FIELDSET)objects. I did try to return xml(form
My app stores EDA information (cad programs for designing microchips) so
storing cell attributes in a json object and taking advantage of json rpc
would be beneficial. I am trying out Alex's new 'json' data type and with
the serializer and IS_JSON() validator. Using the controller function
+1
would a 'json:reference mytable' field type similar to 'list:reference
mytable' or perhaps a format=lambda row: row.json() be possible?
-Bill
On Tuesday, January 15, 2013 6:14:40 PM UTC-6, Derek wrote:
That would be cool, perhaps you could add a class to the fields and key
off the
Hi Bruno,
Forgive me if I missed your updates. The link below does not work today.
Where can I find the latest information.
Regards,
Bill
*# Whats next?
*working on a new plugin for the 'Power' family, it is a JSON based
tableless grid (which is much more than a grid)
hope to release
wow I'd never have thought of that - Thanks!
Valid JSON
On Saturday, January 19, 2013 6:37:08 PM UTC-6, Jonathan Lundell wrote:
On 19 Jan 2013, at 4:21 PM, Bill Thayer bill@live.com javascript:
wrote:
My app stores EDA information (cad programs for designing microchips) so
storing
Been searching a while now for the magic decoder ring that solves the UTF-8
encoding issue.
If I enter a mu (µ) by typing alt+0181 into my form field it looks fine.
Then looking at the data in SQLDeveloper (Oracle) the data is 2 little
boxes. NP I think the client encoding is wrong so I set my
Working on trying out the json support but db won't get past this error.
Traceback (most recent call last):
File C:\web2py_src_2.2.1\web2py\gluon\restricted.py, line 212, in restricted
exec ccode in environment
File C:/web2py_src_2.2.1/web2py/applications/TAMOTO/models/db.py
Another case:
format=lambda row: '{} {}'.format(row.thickness, row.material)
will throws the Oracle Error.
format='%(thickness)s %(material)s',
will not throw the error
--
I am having the same issue trying to serve large cad files.
-Bill
On Tuesday, May 17, 2011 3:02:50 AM UTC-5, Kostas M wrote:
I tried the same application in a Linux (Ubuntu) machine, after the
installation of the latest numpy version (1.6.0).
No MemoryError ticket occured in web2py...
On Wednesday, December 12, 2012 12:15:12 PM UTC-6, Bill Thayer wrote:
I am having the same issue trying to serve large cad files.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
Traceback (most recent call last):
File
Would using an integer field or a list:reference help out?
--
Perhaps check your controllers to see if an update call is being made.
Seems I had an app created with the wizard that added update code to the
controllers.
On Wednesday, December 5, 2012 2:18:46 PM UTC-6, pumplerod wrote:
I went through the admin interface and deleted from there. Then I
Do I then need to use an iterator for my update function?
This is related to my other post where I am getting key errors
https://groups.google.com/d/msg/web2py/3dgZiuDAZDc/DZnJYgaifjIJ
--
Looks like I worked most of the bugs out of this. Hope it saves someone a
lot of time. If you know of a more *obvious or elegant* solution please
post it. Also, my slug field is returning a tuple now. Still works as a
slug but I wish I didn't have the |slug|None| format.
def
type 'exceptions.TypeError' 'Set' object has no attribute '__getitem__'
db.person._after_insert.append(lambda f,id: pprint(f,id)) #book's example
#my code in model file after table definition code.
db.extracted_linear._after_insert.append(
lambda f, id:wiki_update_or_insert(
No the app never really got to 100%. Even when I try to simplify it farther
and takes a different approach there is always a 'roadblock' of errors or
related errors. I get about 90% (I feel) finished and can't get to the last
10% without some round of errors that never gets 100% solved so I
Did you get your answer?
--
After finding some code in a class called RecordUpdater in gluon/dal.py i
think I figured out how to get past my arguments as a set or a
dictwellI was getting a keyerr for 'name' so I put it in a
try-catch but now I'm getting a keyerror for 'id'
In the code below I've only been working
I had a couple of posts on this topic and omi chib has a blog at
http://ochiba77.blogspot.com/2011/10/how-to-setup-web2py-apache-wsgi.html Wish
I had more time for a better response but search for my topics and you
should find some good info on setting up apache.
--
I noticed that you do not add auth.signature to your table definition. Does
it not work for you?
If is_my_chart was somthing I needed often like I'd be tempted to change:
(full discloser: my track record is not good lately)
db.define_table('chart',
Field('chartName'),
LOL Thanks,
On my re-design my previous table had
requires=lambda v,r:
IS_INTEGER_IN_RANGE(0, int((r.pstop-r.pstart)*1)),
but that no longer works so I changed it and applied typecasting when I
forgot forgot my order of ops.
Thanks a bunch.
--
So the same code above is now throwing an error and when I even visit
http://127.0.0.1:8000/PROD/default/index. I know I don't feel right using
request variable in my model file so I changed
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Traceback (most recent call last):
File
Gave it a try...no luck.
--
FWIW, My users will be filtering test station settings to upload the csv to
thier test bench software. My users will need only thier own filtered data
in the CSVso big Me Too! here
--
I don't think that functions in the controller are callable with a
parameter from the web page like form objects are but I could be wrong...
without double checking my code I believe you can call controllers like
this:
@{controller/function/args}
I found that on the markmin cheatsheet.
if you
I'm no genius but (6-5)*1 should be 1 and 5 is between 0 and 10,000
I think
Pstart:GHzPstop:GHzPoints:
enter an integer between 0 and -49995
GHz
from decimal import *
def loadpull_points_in_range(pstop, pstart):
return IS_INT_IN_RANGE(0,
Didn't have ANY problems with this line of work in 2 years of deployment.
So your post does help with migration errors but...
I have 81 tickets today mostly related to lambda taking [1|2] arguments
but only [0|1] given. This leads to all sorts of variations leading to
errors because
Thank youRichard. I've have exhausted everything I could think of to get it
to work.
--
The other day I read on web2py developers a discussion detailing Massimo's
vision of web3py. Perhaps us newbies can start collecting our tickets to
aide Massimo and the developers in understanding what is particularly
difficult or perhaps could use better documentation. Currently I have *480
Can't beleive this question does not come up in the search box. How do i
add a column to a table using SQLlite? Simply adding hte field to the
define table statement throws an error.
Using SQLlite I cannot add a Field. I get an error message:
OperationalError: no such column:
Now that is impressive. I did get it to work but not with SQLFORM or
SQLFORM.smartgrid so that was a large part of my problem.
When renderred in the view created by SQLGRID (clicking the ADD+ button) I
would get the SQLFORM and the person fields were displayed with it's own
submit button.
This widget wouldn't break appadmin? would it? These are the many unknown
things that really frustrate me about web2py.
I edited the models file to test my current troubles adding columns to
tables that are already created. With your sample app, I was able to add
the new table and then add
Hi Richard,
In short...for myself and future searches...This widget works in a straight
up crud form but with SQLFORM it has different behavior. Whether or not it
is the source of appadmin not storing values is yet to be determined.
After my columns were successfully added, values were set to
Niphold,
Really appreciate your taking the time to spell this procedure out. It will
come in handy for me and others too I bet!
Thanks,
Bill
--
Very Interesting. Thank you!
--
I still haven't gotten this to work but do need this functionality
desperatley. Anyone else have any luck?
--
This is a tricky error to figure out so I am documenting it here
class 'cx_Oracle.DatabaseError' ORA-00932: inconsistent datatypes:
expected - got CLOB
To get this error I had at the bottom of a table definition...
...
auth.signature,
format=IS_UPPER()('%(slug)s'),
Hi Massimo,
Came along this group post while searching heare and dal.py to see if the
fix for class 'cx_Oracle.DatabaseError' ORA-01704: string literal too long
I am not finding it in a searc of gluon and subdirectories produces no
results for the above fix. Is there a status update? I am
I guess in SergyPo's example db has changed since then because I cannot get
a db._connection object and
cursor = db._adapter.cursor
cursor.setinputsizes(value = cx_Oracle.CLOB)
produces another error.
I would like to perhaps put these lines after db=DAL(...
Is there a way to get to
Without testing it out it sounds like you are describing the default
behavior from the list:type Fields. I think there is a multiple = True
argument perhaps. Check out
http://web2py.com/books/default/chapter/29/06?search=list%3A#Many-to-many,-list:type,-and-contains
about
2/3 down the page if
If this works it will be very usefull
Is there a way to modify myfunction so that it can be passed to onvalidate
or oncreate fields of SQLFORM.grid?
This is as close as I got but stiil get form validation error (value not in
database) on the referenced field: add_wiki() is my myfunction()
Something like that sounds like you just write a controller to query the
db.wiki_page then use the example view from the book. Don't know of a
stratight db call but I will need the same function soon myself.
This view might work with the right controller:
{{if len(articles):}}
Hi Massimo,
Sorry I didn't get back right away. After playing around...well re-entering
the entire menu one line at a time...I discovered that if I took out the
capitol letters in the slugs then it worked.
Regards,
Bill
--
2.2.1 stable seems to be going through http for me on Chrome.
--
When you say listing pages created by auth.wiki I take that to mean a
listing to display within the web browser. On mine I do have my index()
controller return auth.wiki and as long as I am logged into my application
I see an option under the [wiki] menu that says manage pages.
On Friday,
not displayed by default in the appadmin database management.
On Sunday, October 21, 2012 2:43:14 PM UTC-7, Bill Thayer wrote:
When you say listing pages created by auth.wiki I take that to mean a
listing to display within the web browser. On mine I do have my index()
controller return auth.wiki
Just tried it again. Logged in with my email and password then it took me
to a blank page with one line on top that says to sign in with google
password.
On Thursday, October 18, 2012 8:23:58 AM UTC-5, Alan Etkin wrote:
El martes, 16 de octubre de 2012 18:12:46 UTC-3, Bill Thayer escribió:Hi
Oh.
So that's why a reference field should not be named the same as the table
it's referencing. In this case I didn't make the name but generally I do
that all the time. Didn't realize that it makes error messages clearer. Duh.
-Bill
--
:55:02 PM UTC-7, Bill Thayer wrote:
Try this:
In db.py:
from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
auth = Auth(db)
crud, service, plugins = Crud(db), Service(), PluginManager()
auth.define_tables(username=True) # arg makes it so you can use a
username instead
Using the auth.wiki I am defining my menu. When I hit submit I get the
error below. The menu I wrote in is currently long I guess but it couldn't
be more than 4000 bytes (oracle CLOB length) could it? Perhaps it's the
HTML that gets stored in the DB?...That's what I suspected then I
This is in my db.py. Allen told me to add the second line after calling
auth.define_tables
auth.define_tables(username=True, signature=False, migrate=True,fake_migrate
=True)
auth.wiki(resolve=False)
the second line calls the wiki() function to create the tables.
Regards,
Bill
--
Back on the original topic. When I click on a menu item I also get
re-directed back to the _create page. Is this a permission thing perhaps?
Now that I mention it, isn't there supposed to be a field to select the
permission level for the page?
--
for the advice!
-Bill
On Tuesday, October 16, 2012 9:17:25 PM UTC-5, Massimo Di Pierro wrote:
Try:
@{component:default/part_manage.load}
Or customize the part_manage.html to not {{extend 'layout.html'}}
On Tuesday, 16 October 2012 19:20:35 UTC-5, Bill Thayer wrote:
Hello everyone,
Thanks to Allen
Try this:
In db.py:
from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
auth = Auth(db)
crud, service, plugins = Crud(db), Service(), PluginManager()
auth.define_tables(username=True) # arg makes it so you can use a username
instead of email to login
On Wednesday, October
Note for future searchers people as foolish as I am to try and use Oracle
for web site backend.
This happened to me after I finally got the auth.wiki installed in my
application and the application connected to Oracle. I had to manually
create the wiki_page, wiki_media, and wiki_tab tables in
Pierro wrote:
On Tuesday, 16 October 2012 11:23:29 UTC-5, Bill Thayer wrote:
Note for future searchers people as foolish as I am to try and use
Oracle for web site backend.
I did not have this issue with tables created by web2py.
so why did you create the wiki tables manually? I am
Hi Alan.
I went through the registration process, got the Google sign in. Signed in
with google too and then did not get re-directed back.
-Bill
On Wednesday, September 12, 2012 11:49:47 AM UTC-5, Alan Etkin wrote:
El miércoles, 12 de septiembre de 2012 12:19:02 UTC-3, Tito Garrido
https://lh3.googleusercontent.com/-6ZrkWiYpzU8/UH3T2J1J9II/ACo/bdZfoL-xDfg/s1600/funnymenu.png
--
Hello everyone,
Thanks to Allen, Villas, of course Massimo among a few others I have web2py
auth.wiki with Oracle storing the media blobs and all the pages. I believe
I can use the wiki features in a structure way to improv productivity and
cross department functionality in my workplace.
Now
Hello Mike,
I'm not an expert but i think you need to go to
http://127.0.0.1:8000/myapp/appadmin/index then click on the auth user
table and add a user,
then go to the groups table table and create a manager
then go to the membership table and make your new user a manager
then go to the
Perhaps someone can check session.connect with Oracle for a rocket server
memory leak?
To reproduce on windows 7 using web2py 2.1.1 from source:
1) Create a new simple application called simpleapp where simpleapp is the
name of an application with an Oracle table for storing sessions
2) Create
That's all I have right now. Haven't tried it with SQLLite.
On Monday, October 15, 2012 3:35:25 PM UTC-5, Massimo Di Pierro wrote:
I this only work Oracle?
On Monday, 15 October 2012 14:56:44 UTC-5, Bill Thayer wrote:
Perhaps someone can check session.connect with Oracle for a rocket
Thought I'd start over with a brand new application get the wiki working
but I am running into difficulty before I even get to the wiki part.
I created a brand new app and started by moving my 0.py file into models
then edited db.py like so:
if not request.env.web2py_runtime_gae:
## if
Hi villas,
Yes I agree and did do that. My development is at point where my tables
are defined. If I go much farther into development without deploying to the
test server than it is too difficult to narrow down errors so i want to
focus on the basic functionality up front. With all of the
application. No tables other
than auth_ and web2py_session_ defined here yet.
-Bill
On Monday, October 15, 2012 4:30:17 PM UTC-5, Massimo Di Pierro wrote:
I am using sqlite and I tried sessions in db (again) and I cannot
reproduce this problem.
On Monday, 15 October 2012 16:03:45 UTC-5, Bill
is garbage collected and it stabilizes.
massimo
On Monday, 15 October 2012 15:39:30 UTC-5, Bill Thayer wrote:
That's all I have right now. Haven't tried it with SQLLite.
On Monday, October 15, 2012 3:35:25 PM UTC-5, Massimo Di Pierro wrote:
I this only work Oracle?
On Monday, 15 October 2012
After checking SQL developer and discovering the Triggers were not made for
web2py_storage_tamoto table I recalled this post:
https://groups.google.com/d/msg/web2py/r7qMRK2Eir0/D91Ine9NMzkJ
from earlier today. That error occured at line 2865 in dal.py so the
triggers never got created.
So using
Thank you. I voted for it.
On Sunday, October 14, 2012 9:43:03 AM UTC-5, Alan Etkin wrote:
I didn't expect you wanted to add a field to the table after calling .,,
I opened an issue in the project page
http://code.google.com/p/web2py/issues/detail?id=1087
--
I tried your patch but the tables were not defined. Is my db.py code
correct? The commented out code causes an errortype
'exceptions.AttributeError'('DAL' object has no attribute 'wiki_media')
but when commented out the appadmin displays all the tables except the
wiki_ tables.
from gluon
octubre de 2012 15:56:05 UTC-3, Bill Thayer escribió:
I tried your patch but the tables were not defined. Is my db.py code
correct? The commented out code causes an errortype
'exceptions.AttributeError'('DAL' object has no attribute 'wiki_media')
but when commented out the appadmin displays
'
db.wiki_page.filedata.represent = lambda value,row: \
A('get it', _href=URL('download', args=value))
auth.define_tables(username=True, migrate=False, fake_migrate=True)
.
.
.
On Sunday, October 14, 2012 4:06:09 PM UTC-5, Alan Etkin wrote:
El domingo, 14 de octubre de 2012 15:56:05 UTC-3, Bill Thayer
#code now looks like this, put the represent= inside the
# call to extra_fileds
.
.
.
auth.settings.extra_fields[wiki_media] = [
Field(filedata, blob,
represent = lambda value,row: \
A('get it', _href=URL('download', args=value))),]
auth.define_tables(username=True,
the index displays the login page but after logging in returns the login
page without logging in the user (user is in db)
editing the user from auth_user edit user page returns the edit user page
without committing the changes.
registering a new user or adding one from auth_user simply returns
I did not have much luck with 64 bit anything. I think Oracle XE might can
be 64 bit but I am using cx_Oracle-5.1.2-11g.win32-py2.7 with 32 bit python
2.7 and web2py 2.0.9.
On Saturday, October 13, 2012 4:58:55 AM UTC-5, Alec Taylor wrote:
Getting this error:
raise RuntimeError, no
:
¿What error do you get?
To force the wiki class to define the tables before serving the wiki pages
(so you can customize them) you must add something like this to the model
auth.wiki(resolve=False)
El viernes, 12 de octubre de 2012 18:47:10 UTC-3, Bill Thayer escribió:
I applied the patch
I'm certainly no expert but I might try to define:
ref_asset_category.format=('%(asset_category_name)s') or something like
that.
Check my syntax of course. Hope it works.
-Bill
On Saturday, October 13, 2012 7:11:35 PM UTC-5, Kenneth wrote:
Hello,
this is my first time trying to connect
I'm just starting down the same road so I hope you found success or at
least some resources.
So far I've had to manually add the tables found in tools.py to Oracle.
From here it looks like I might need:
from gluon.tools import Auth, Crud, Service, PluginManager, prettydate, Wiki
auth =
(Field('filedata', 'blob'))
media.filedata.represent = lambda value,row: \
A('get it', _href=URL('download', args=value))
db.wiki_media.filename.uploadfield='filedata'
On Friday, October 12, 2012 3:48:11 PM UTC-5, Bill Thayer wrote:
I'm just starting down the same road so I hope you found
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
'
On Tuesday, October 9, 2012 9:30:00 PM UTC-5, Massimo Di Pierro wrote:
Bill,
have you tried using web2py wil sqlite only? does that work for you? I do
not understand the reason for migrate=false.
On Tuesday, 9 October 2012 17:19:28 UTC-5, Bill Thayer wrote:
Fixing broken migrations
-5, Bill Thayer wrote:
Fixing broken migrations...
db.define_table(,migrate=False,fake_migrate=True) means rebuild the
table meta data according to the table definitions.
db = DAL(...,fake_migrate_all=True) means you are fixing all the tables at
once but will not help in narrowing down
This question should show my lack of Python knowledge but here goes...
In gluon.tools
def Wiki(object):
.
.
.
table_definitions = {
'wiki_page':{
'args':[
Field('slug',
requires=[IS_SLUG(),
UTC-5, Cliff Kachinske wrote:
Can you connect to the database outside of Web2py?
The long delay can mean connection problems, which I have induced by
typing the db name incorrectly.
On Monday, October 8, 2012 8:06:58 PM UTC-4, Bill Thayer wrote:
Hi Massimo,
Thank you.
After
1 - 100 of 159 matches
Mail list logo