[web2py] Re: Oracle Driver Not Available When web2py run from bash script

2016-03-14 Thread Ben Wolski
Yes, the path/user/versions were all the same. I figured out that even 
though the $DYLD_LIBRARY_PATH and $LD_LIBRARY_PATH environment variables 
are set correctly in an interactive bash terminal, a bash script cannot see 
those same variables. Something must be overwriting them, so now I'm just 
setting those variables in the same script that I'm using to start web2py. 
Thanks! -- Benjamin Wolski

El lunes, 22 de febrero de 2016, 1:04:03 (UTC-8), Niphlod escribió:
>
> are they running from the same path and under the same user ?
>
> On Monday, February 22, 2016 at 7:00:07 AM UTC+1, Ben Wolski wrote:
>>
>> Hi all! I'm connecting to an Oracle db for the first time and I hit a 
>> snag when trying to start web2py from a bash script. 
>>
>>
>> As you can see highlighted below, running the command as a script fails 
>> to find the oracle driver, but running from the command line does.
>>
>>
>> Any ideas why this would be?
>>
>>
>> Thanks!
>>
>> Benjamin
>>
>>
>> $ cat run_server.sh 
>> #!/bin/bash
>> python web2py.py -a 'password' -i 10.2.24.61 -p 8000
>>
>>
>>
>>
>> $ bash run_server.sh 
>> web2py Web Framework
>>
>>  
>> Created by Massimo Di Pierro, Copyright 2007-2016 
>>
>> Version 2.13.4-stable+timestamp.2015.12.26.04.59.39 
>>
>> Database drivers available: sqlite3, imaplib, pyodbc, pymysql, pg8000 
>>
>>
>>  
>>
>> please visit: 
>>
>>  http://10.2.24.61:8000/ 
>>
>> use "kill -SIGTERM 6115" to shutdown the web2py server
>>
>>
>>
>>
>> $ python web2py.py -a 'password' -i 10.2.24.61 -p 8000
>>
>> web2py Web Framework
>>
>> Created by Massimo Di Pierro, Copyright 2007-2016
>>
>> Version 2.13.4-stable+timestamp.2015.12.26.04.59.39
>>
>> Database drivers available: cx_Oracle, pymysql, imaplib, sqlite3, pg8000, 
>> pyodbc
>>
>>
>> please visit:
>>
>> http://10.2.24.61:8000/
>>
>> use "kill -SIGTERM 6122" to shutdown the web2py server
>>
>>
>>

-- 
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.


[web2py] Re: DAL and schema

2016-03-11 Thread Ben Wolski
executing the following query after defining my db in db.py helped me query 
an Oracle db that requires a schema:

db_prod.executesql("ALTER SESSION SET CURRENT_SCHEMA = BDR;")

El viernes, 2 de marzo de 2012, 3:58:35 (UTC-8), Wuwei escribió:
>
> Hello,
> I'm trying to use DAL with a MSSQL db.
> I need to work with tables from 2 different schemas but I don't find how 
> to specify the schema when I define the table.
>
> Can you help me?
>
> Thank you.
>

-- 
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.


[web2py] Oracle Driver Not Available When web2py run from bash script

2016-02-21 Thread Ben Wolski
 

Hi all! I'm connecting to an Oracle db for the first time and I hit a snag 
when trying to start web2py from a bash script. 


As you can see highlighted below, running the command as a script fails to 
find the oracle driver, but running from the command line does.


Any ideas why this would be?


Thanks!

Benjamin


$ cat run_server.sh 
#!/bin/bash
python web2py.py -a 'password' -i 10.2.24.61 -p 8000




$ bash run_server.sh 
web2py Web Framework

 
Created by Massimo Di Pierro, Copyright 2007-2016 

Version 2.13.4-stable+timestamp.2015.12.26.04.59.39 

Database drivers available: sqlite3, imaplib, pyodbc, pymysql, pg8000 


 

please visit: 

 http://10.2.24.61:8000/ 

use "kill -SIGTERM 6115" to shutdown the web2py server




$ python web2py.py -a 'password' -i 10.2.24.61 -p 8000

web2py Web Framework

Created by Massimo Di Pierro, Copyright 2007-2016

Version 2.13.4-stable+timestamp.2015.12.26.04.59.39

Database drivers available: cx_Oracle, pymysql, imaplib, sqlite3, pg8000, 
pyodbc


please visit:

http://10.2.24.61:8000/

use "kill -SIGTERM 6122" to shutdown the web2py server


-- 
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.


[web2py] Why does this Web2Py ajax call fail to return the value of a variable?

2016-01-21 Thread Ben Wolski


Here is the relevant snippet from my Web2Py view:


{{for candidate in rows:}}


{{=candidate.votes}}

{{=IMG(_src=URL('photos',candidate.path_to_photo), _alt="Photo of 
Candidate")}}
{{=candidate.name}}

   {{pass}}

And the relevant snippet from my Web2Py controller:

def arrow_button_callback():
response.flash = str(request.post_vars.name)
return request.post_vars.name

So why do I see the string "None" in my target div (and in my flash)?


Thank you for your help. I read chapter 11 of the Web2Py book and I'm still 
confused.


I really want to be able to pass candidate.id (depending on which row's 
button was pressed) and the button direction to controller variables. 
Please let me know if there's a better way to do this.


--Benjamin


stack overflow crosspost 


-- 
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.