[web2py] Re: Problems with oracle - name is already used by an existing object

2017-12-04 Thread Sven
same problem here. I also changed line 70 as stated below but still I get 
the error "
not all arguments converted during string formatting" 

line 70, in create_sequence_and_triggers

Only the table auth_users is created but no sequence 
(I cloned the current git master brunch)
How can I get web2py work with Oracle (12c) 

best regards 
Sven

Am Donnerstag, 24. August 2017 01:57:14 UTC+2 schrieb Zbigniew Pomianowski:
>
> After i upgraded to 2.15.3 I got serious problems with Oracle. First of 
> all: new lowercase tables were created. Then I read that this is due to the 
> new "entity_quoting" option. Nevertheles I decided to degrade my project to 
> basic auth tables (nothing more!).
> I dropped everything on Oracle side via sqlplus. After first request I got 
> this error. Migration is active to create tables, "app_auth_user" is 
> created and then error. No *.table files in databases folder. Fighting 
> several hours with this (so basic!) issue.
> I am getting crazy because of that :(
>
> Note: I changed oracle.py at line 70, because "all parameters were not 
> converted" error
>
> Can anyone help?
>
> Environment: python 2.7.12, oracle 12.2, cx_Oracle 6.0.1, web2py 2.15.3, 
> Ubuntu 16.04 LTS
>
>
> Traceback (most recent call last):
>   File "/home/zpomianowski/web2py/gluon/restricted.py", line 219, in 
> restricted
> exec(ccode, environment)
>   File "/home/zpomianowski/web2py/applications/eparagon/models/db.py" 
> <http://127.0.0.1:8000/admin/default/edit/eparagon/models/db.py>, line 59, in 
> 
> auth.define_tables(username=False, signature=False)
>   File "/home/zpomianowski/web2py/gluon/tools.py", line 2216, in define_tables
> super(Auth, self).define_tables(username, signature, migrate, 
> fake_migrate)._table_signature_list
>   File "/home/zpomianowski/web2py/gluon/authapi.py", line 350, in 
> define_tables
> format='%(first_name)s %(last_name)s (%(id)s)'))
>   File "/home/zpomianowski/web2py/gluon/packages/dal/pydal/base.py", line 
> 587, in define_table
> table = self.lazy_define_table(tablename, *fields, **args)
>   File "/home/zpomianowski/web2py/gluon/packages/dal/pydal/base.py", line 
> 621, in lazy_define_table
> polymodel=polymodel)
>   File "/home/zpomianowski/web2py/gluon/packages/dal/pydal/adapters/base.py", 
> line 797, in create_table
> return self.migrator.create_table(*args, **kwargs)
>   File "/home/zpomianowski/web2py/gluon/packages/dal/pydal/migrator.py", line 
> 277, in create_table
> self.adapter.create_sequence_and_triggers(query, table)
>   File 
> "/home/zpomianowski/web2py/gluon/packages/dal/pydal/adapters/oracle.py", line 
> 68, in create_sequence_and_triggers
> self.execute(query)
>   File 
> "/home/zpomianowski/web2py/gluon/packages/dal/pydal/adapters/__init__.py", 
> line 67, in wrap
> return f(*args, **kwargs)
>   File 
> "/home/zpomianowski/web2py/gluon/packages/dal/pydal/adapters/oracle.py", line 
> 52, in execute
> rv = self.cursor.execute(command, *args[1:], **kwargs)
> DatabaseError: ORA-00955: name is already used by an existing object
>
>
>

-- 
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/d/optout.


Re: [web2py] add_membership, del_membership, add_membership = IntegrityError (is_active)

2015-10-19 Thread &#x27;Sven Slezák' via web2py-users
actually, I don't care if the record is deleted or not. ;-)
I want to be able to remove memberships and reset them later with the same 
mechanism (auth.add_membership, auth.del_membership, auth.add_membership).
is this considered a bug?
or is there a different handling I have to use with auth.signature enabled?


> Am 19.10.2015 um 11:59 schrieb 黄祥 :
> 
> nope, the recent version (2.12.3) have the same auth.signature that work like 
> that.
> if you realy want to delete the data (not just set the is_active into False 
> when user delete it from web application), i think you can disable 
> auth.signature in your table definition, or simply just remove it from 
> database console.
> 
> best regards,
> stifan
> 
> -- 
> 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 a topic in the Google 
> Groups "web2py-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/web2py/f43Fo2ceir0/unsubscribe 
> .
> To unsubscribe from this group and all its topics, send an email to 
> web2py+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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/d/optout.


Re: [web2py] add_membership, del_membership, add_membership = IntegrityError (is_active)

2015-10-19 Thread &#x27;Sven Slezák' via web2py-users
thanks, stifan.
this will be my work around but how is it supposed to work?
or is this fixed in a newer version of web2py?


> Am 19.10.2015 um 11:34 schrieb 黄祥 :
> 
> the web2py version is quite old :)
> btw, i think it's about how auth.signature work. the auth.signature contain 
> table field is_active with boolean field type, so if user delete the data 
> (not just the auth_membership), it automatically set the is_active into False 
> (F) into the data that you choose to delete.
> i think you can set it back the value of is_active into True if you want the 
> data of auth_membership to be able to used again.
> 
> best regards,
> stifan
> 
> -- 
> 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 a topic in the Google 
> Groups "web2py-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/web2py/f43Fo2ceir0/unsubscribe 
> .
> To unsubscribe from this group and all its topics, send an email to 
> web2py+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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/d/optout.


Re: [web2py] Re: de language file of app admin broken

2013-06-13 Thread Sven Slezák
Yes, where should I put the corrected file?

--
su...@mezzo.net
mobile +49 1511 5050100


> Am 13.06.2013 um 22:24 schrieb Massimo Di Pierro :
> 
> Can you help us fix it?
> 
> 
>> On Wednesday, 12 June 2013 18:49:44 UTC-5, sunny wrote:
>> the german language file of the app admin is broken.
>> umlauts are question marks.
> 
> -- 
>  
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "web2py-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/web2py/J9uIi5JOtgA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 

--- 
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] service authentication

2010-06-21 Thread Sven
Hello!

Reading the entries in this group related to authentification brought
no solution for this problem:

This is my controller:
@auth.requires_login()
def demo():
return dict(msg='Hello World')

Calling it with curl does just a redirect:
curl -u u...@domain.de:password http://127.0.0.1:8000/authdemo/default/demo.json
You are being redirected here

Same with this syntax:
curl -u 
http://user%40domain.de:passw...@127.0.0.1:8000/authdemo/default/demo.json
You are being redirected here

How do I use services with basic authentication? In the end I would
like to use web2py as json backend for a frontend build with sencha



[web2py] Re: strange result in db admin query

2010-04-12 Thread Sven
That makes sense. I had changed the 'meaning' of mtref into int,
without changing its type.
Forgot about that.

Thanks!

On Apr 12, 5:50 pm, mdipierro  wrote:
> Sure that db.participant.mtref  is not a string? What is the type?
>
> On Apr 12, 6:33 pm, Sven  wrote:
>
>
>
> > Hi,
>
> > I was just using the default db admin page in web2py and filled in
> > 'db.participant.mtref > 41' as a query for my participant table.
> > Surprisingly it returned (this is just part of the output on the
> > screen):
>
> > participant.id  participant.mtref
> > 22149           8
>
> > It returns 49 records, 9 of which have a participant.mtref < 41
>
> > any idea how this is possible?
>
> > Sven


-- 
To unsubscribe, reply using "remove me" as the subject.


[web2py] strange result in db admin query

2010-04-12 Thread Sven
Hi,

I was just using the default db admin page in web2py and filled in
'db.participant.mtref > 41' as a query for my participant table.
Surprisingly it returned (this is just part of the output on the
screen):

participant.id  participant.mtref
22149   8

It returns 49 records, 9 of which have a participant.mtref < 41

any idea how this is possible?

Sven


-- 
To unsubscribe, reply using "remove me" as the subject.


[web2py] Re: concurrency problem

2010-04-05 Thread Sven
First of all I agree. I can just as well use a full-feature db and I
have migrated to postgresql.
I was just curious if it was possible/sensible to solve the problem
without changing database or my application code; in other words let
web2py do it for me. I guess the answer is no ;)

Sven

-- 
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: concurrency problem

2010-04-04 Thread Sven
Thanks for your thoughts.

@Yarko the locking code snippet seems useful. In this case, however,
my users never updated the same record. The problem was the locking of
the complete database each time two users updated or created 'their
own' records.

@Beerc PostgreSQL did the trick, thanks :)

The sqlite docs suggest, however, that it should be possible to have
small multi-user applications using sqlite. I mean, a few users
reading/writing each 20/30 seconds does not have to be a  problem if
each request locks the database  for x milliseconds. I just
incorrectly assumed that handling occasional locks would have been
handled somehow by the DAL.

Just a thought (don't know if it makes sense): what about implementing
a simple sqlite lock handling mechanism into DAL? For example retry to
read/write the sqlite database a few times before giving up. Don't
know if that's the best approach, but it might have solved my problem
(possibly reduce cebergs  5-10% no content problem too) and
fascilitate small multi-user projects with web2py+sqlite. I feel a few
multi-user writes in 30 seconds should not require me to adopt a full
relational database (unnecessary memory footprint for my small
project) or writing this lock handling code myself specifically for
sqlite (removing some of the advantage for using DAL and sqlite out of
the box; one of the reasons to use web2py in the first place).

On the other hand installing postgreSQL was easy enough and it's great
that I only needed to change 1 line of code in my web2py
application :)

-Sven

-- 
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] concurrency problem

2010-04-02 Thread Sven
Hi,

I programmed a psychological experiment in flash and store answers/
results in a sqlite database using web2py (behind  nginx server +
fastcgi)  and pyamf. Everything seems to be all right when I test it,
but with as few as 2 simultaneous users I (sometimes) run into
trouble. A try with seven simultaneous users resulted in only 2
succesfully stored experimental data.sets
I find it very hard to debug, since there are no tickets in web2py.
Flash does sometimes produce a remoting error in that situation, but
without too much information.

I seems to me there is some kind of concurrency problem, but I assumed
web2py/sqlite would take care of that for me. Or should I explicitly
deal with this? Explicitly commit, check if inserts and updates were
successful and if not try again?

Any suggestions, comments ideas would be really appreciated.

Thanks.

Sven

-- 
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: clueless about db insert: IntegrityError: participant.type may not be NULL

2010-03-23 Thread Sven
Thanks! Adding the field as invisible works. But I prefer to dump -
drop - create - restore approach. After fiddling around I have two
questions about that though

1) Why can I see the db object with corresponding tables in shell, but
not access the database behind it? (ProgrammingError: Cannot operate
on a closed database.) I assume either my admin or my application is
locking it. But why would it do that if no transactions are going on?

2) In added tot the end of db.py:

for table in db.tables: db[table].drop()

The sql.log shows that most of the tables are indeed dropped (and
recreated in next request ). But two of my tables are not dropped and
no mention is made in sql.log. (no other error messages either)

db.tables

in shell shows which tables remained: ['auth_group',
'auth_permission', 'participant', 'svo_answer']

So my question becomes how do I get rid of the 'participant' and
'svo_answer' tables using web2py (both shell and application)?

Thanks again.

Sven

On Mar 23, 7:39 am, mdipierro  wrote:
> Because you used sqlite  and your made the field "type" as
> notnull=True. sqlite does not support ALTER TABLE DROP COLUMN so the
> field is still there. I suggest you dump the dump the db, recerate it
> and restore the dump or add the field again as invisible (not sure if
> this will work, give it a try):
>
> Field('type',default='',writable=False,readable=False)
>
> On Mar 23, 6:16 am, Sven  wrote:
>
>
>
> > Hi,
>
> > I am new to web2py and really like it so far. I just ran into trouble
> > though, and can't find the solution myself.
>
> > The error message is:
> > "IntegrityError: participant.type may not be NULL"
>
> > as a result of calling:
> > "db.participant.insert(unique_ref=ref, batch_type=session.batch_type,
> > batch_name=session.batch_name)"
>
> > I have defined a table 'participants' and 'type' used to be one of its
> > fields. However, I changed the definition and the field is now called
> > 'batch_type'. Since there is currently no 'participant.type' in my
> > code, why does it show up in the error message?
>
> > I hope someone has a suggestion.
>
> > Thanks .
>
> > Sven

-- 
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] clueless about db insert: IntegrityError: participant.type may not be NULL

2010-03-23 Thread Sven
Hi,

I am new to web2py and really like it so far. I just ran into trouble
though, and can't find the solution myself.

The error message is:
"IntegrityError: participant.type may not be NULL"

as a result of calling:
"db.participant.insert(unique_ref=ref, batch_type=session.batch_type,
batch_name=session.batch_name)"

I have defined a table 'participants' and 'type' used to be one of its
fields. However, I changed the definition and the field is now called
'batch_type'. Since there is currently no 'participant.type' in my
code, why does it show up in the error message?

I hope someone has a suggestion.

Thanks .

Sven

-- 
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:15744] Appcelerator

2009-02-02 Thread Sven

Hi,

There was a discussion on Appcelerator (www.appcelerator.com)
integration in Oct. last year. Any news on this topic or at least some
guides how to use both frameworks in an upwards compatible way ?

kind regards,
Sven
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---