So I have run the following to try and purge my current account: #sign in: import cx_Oracle db = cx_Oracle.connect('WEB2PY', 'pw', 'server:1521/sid') cursor = db.cursor()
#List all tables: cursor.execute('SELECT table_name FROM all_tables') for row in cursor: print row #delete Table: cursor.execute("DROP TABLE blah PURGE") cursor.execute("DROP TABLE AUTH_USER PURGE") cursor.execute("DROP TABLE AUTH_GROUP PURGE") cursor.execute("DROP TABLE AUTH_MEMBERSHIP PURGE") cursor.execute("DROP TABLE AUTH_PERMISSION PURGE") cursor.execute("DROP TABLE AUTH_EVENT PURGE") cursor.execute("DROP TABLE AUTH_CAS PURGE") ----- But when I try to navigate to the page I get the same error as the last one "<class 'cx_Oracle.DatabaseError'> ORA-00955: name is already used by an existing object" and it creates "auth_user" and stops. Is there another table on Oracle that holds what tables it believes has been created? On Monday, December 28, 2015 at 8:58:39 AM UTC-8, Michael Messmer wrote: > > Looks like it was permission issues and the RPM's were installing to a > directory under /usr/.... Now I am getting > > Traceback (most recent call last): > File "/opt/www-data/web2py/gluon/restricted.py", line 227, in restricted > exec ccode in environment > File "/opt/www-data/web2py/applications/test/models/db.py" > <https://xnvbase00245.corp.costco.com/admin/default/edit/test/models/db.py>, > line 61, in <module> > auth.define_tables(username=False, signature=False) > File "/opt/www-data/web2py/gluon/tools.py", line 2059, in define_tables > format='%(first_name)s %(last_name)s (%(id)s)')) > File "/opt/www-data/web2py/gluon/packages/dal/pydal/base.py", line 834, in > define_table > table = self.lazy_define_table(tablename,*fields,**args) > File "/opt/www-data/web2py/gluon/packages/dal/pydal/base.py", line 873, in > lazy_define_table > polymodel=polymodel) > File "/opt/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", line > 482, in create_table > self.create_sequence_and_triggers(query, table) > File "/opt/www-data/web2py/gluon/packages/dal/pydal/adapters/oracle.py", > line 145, in create_sequence_and_triggers > self.execute(query) > File "/opt/www-data/web2py/gluon/packages/dal/pydal/adapters/oracle.py", > line 138, in execute > return self.log_execute(command, args) > File "/opt/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", line > 1379, in log_execute > ret = self.get_cursor().execute(command, *a[1:], **b) > DatabaseError: ORA-00955: name is already used by an existing object > > > > So it looks like its working I just have to clean the tables and start fresh. > > > On Thursday, December 24, 2015 at 2:31:06 PM UTC-8, Michael Messmer wrote: >> >> I think it is too. Just made some progress. And a bunch of VM's later: >> >> Error ticket for "test" >> Ticket ID >> 172.21.140.228.2015-12-24.14-29-42.af6f82d8-d7b2-4a69-8409-1cf04d67c994 >> >> <type 'exceptions.RuntimeError'> Failure to connect, tried 5 times: >> Traceback (most recent call last): File >> "/opt/www-data/web2py/gluon/packages/dal/pydal/base.py", line 446, in >> __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File >> "/opt/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", line 60, >> in __call__ obj = super(AdapterMeta, cls).__call__(*args, **kwargs) File >> "/opt/www-data/web2py/gluon/packages/dal/pydal/adapters/oracle.py", line >> 118, in __init__ if do_connect: self.reconnect() File >> "/opt/www-data/web2py/gluon/packages/dal/pydal/connection.py", line 125, in >> reconnect self.connection = f() File >> "/opt/www-data/web2py/gluon/packages/dal/pydal/adapters/oracle.py", line >> 116, in connector return self.driver.connect(uri,**driver_args) >> DatabaseError: ORA-12514: TNS:listener does not currently know of service >> requested in connect descriptor >> >> Version >> web2py™ Version 2.13.2-stable+timestamp.2015.12.18.11.00.46 >> Traceback (most recent call last): >> File "/opt/www-data/web2py/gluon/restricted.py", line 227, in restricted >> exec ccode in environment >> File "/opt/www-data/web2py/applications/test/models/db.py", line 20, in >> <module> >> db = DAL(myconf.take('db.uri'), pool_size=myconf.take('db.pool_size', >> cast=int), check_reserved=['all']) >> File "/opt/www-data/web2py/gluon/packages/dal/pydal/base.py", line 174, >> in __call__ >> obj = super(MetaDAL, cls).__call__(*args, **kwargs) >> File "/opt/www-data/web2py/gluon/packages/dal/pydal/base.py", line 473, >> in __init__ >> "Failure to connect, tried %d times:\n%s" % (attempts, tb) >> RuntimeError: Failure to connect, tried 5 times: >> Traceback (most recent call last): >> File "/opt/www-data/web2py/gluon/packages/dal/pydal/base.py", line 446, >> in __init__ >> self._adapter = ADAPTERS[self._dbname](**kwargs) >> File "/opt/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", >> line 60, in __call__ >> obj = super(AdapterMeta, cls).__call__(*args, **kwargs) >> File >> "/opt/www-data/web2py/gluon/packages/dal/pydal/adapters/oracle.py", line >> 118, in __init__ >> if do_connect: self.reconnect() >> File "/opt/www-data/web2py/gluon/packages/dal/pydal/connection.py", >> line 125, in reconnect >> self.connection = f() >> File >> "/opt/www-data/web2py/gluon/packages/dal/pydal/adapters/oracle.py", line >> 116, in connector >> return self.driver.connect(uri,**driver_args) >> DatabaseError: ORA-12514: TNS:listener does not currently know of service >> requested in connect descriptor >> >> >> >> >> On Friday, December 4, 2015 at 11:03:12 PM UTC-8, Rakesh Singh wrote: >>> >>> My guess is that this is a permission issue. >>> cx_Oracle may be accessible to Web2Py, but the Oracle libraries may be >>> readable by your nginx user >>> >>> What are the permissions your ORACLE_HOME directory and files within it? >>> >>> /usr/include/oracle/11.1 >>> >>> >>> On Wednesday, 7 October 2015 00:37:10 UTC+2, Michael M wrote: >>>> >>>> 2.12.3-stable+timestamp.2015.08.19.00.18.03 >>>> (Running on Apache/2.4.16 (Fedora) OpenSSL/1.0.1k-fips mod_wsgi/4.4.8 >>>> Python/2.7.10, Python 2.7.10) >>>> >>>> So "import cx_Oracle" works in python console but when I tried using it >>>> in web2py it errors out. <type 'exceptions.ImportError'>(Cannot >>>> import module 'applications.test2.modules.cx_Oracle') >>>> >>>> the only thing i have found is that the file structure looks different >>>> from cx_Oracle to another import i use. >>>> >>>> pysnmp works in web2py and straight python: >>>> >>> import pysnmp >>>> >>> pysnmp.__file__ >>>> '/usr/lib/python2.7/site-packages/pysnmp/__init__.pyc' >>>> >>>> cx_Oracle doesnt work in web2py but works in py files. >>>> >>> import cx_Oracle >>>> >>> cx_Oracle.__file__ >>>> '/usr/lib/python2.7/site-packages/cx_Oracle.so' >>>> >>>> >>>> the only difference I saw was that its a .so file instead of >>>> __init__.pyc >>>> >>>> Any thoughts. Trying to get this to work in Fedora 22. Thanks! >>>> >>>> -- 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.