[web2py] web2py UnicodeDecodeError: 'utf8' codec can't decode byte 0xc7 in position 15: invalid continuation

2016-02-04 Thread Fábio Filho

I'm using a firebird legacy database and when I make this query:

dbFb.INVENTORY.CODE==3

i got this output error:

UnicodeDecodeError: 'utf8' codec can't decode byte 0xc7 in position 15: 
invalid continuation


*there is a field called 'name', and when dbFb.INVENTORY.CODE==3,*
*the field name has a word 'ç' in its value *

Anyone can help me?


-- 
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] web2py fails to read words in utf8 format with db.executesql()

2016-01-31 Thread Fábio Filho


I'm having a problem with my web2py website When I execute a sql 
command, for all fields that has "ç", I got this message:

'utf8' codec can't decode byte 0xc7 in position 15: invalid continuation 
byteError

This is my method:

def get_something():
mRow=dbFb.executesql("select first 1 CODIGO, NOME, PRECO_CONS, QTD  from 
ESTOQUE where CODIGO='"request.vars.mCode+"'", as_dict = True)

How can i fix this?

-- 
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: Interact Web2Py App with Android App Security

2015-10-03 Thread Fábio Filho
i thought i can use this session in my schema... 
but really, i have no idea what i need to do ...

i read something about base authentication in Web2Py,  is this helpful?





Em sexta-feira, 2 de outubro de 2015 19:47:09 UTC-3, Niphlod escreveu:
>
> what authentication do you want to support ? web2py's default use session 
> cookies, but you need to get to the login page and obtain one before 
> hitting a protected page 
>
> On Friday, October 2, 2015 at 11:06:25 PM UTC+2, Fábio Filho wrote:
>>
>> I'm sorry by my english
>>
>> How can i connect my android application in my web2py site using auth 
>> authentication (@auth.requires_login)?
>>
>> I need make a secure connection between them
>>
>> for example: 
>>
>>
>> Web2Py Side :
>>
>> @auth.requires_login()
>> def get_examplet():
>> return "{'code':'0'}"
>>
>>
>>
>>
>> Android Java side: 
>>
>> new Thread(){
>>   
>>   @Override
>>   public void run(){
>>   
>> Http.request("localhost:8080/mysite/controller/get_example") 
>> ;  //  < i got a refused connection because that python line code 
>> ("@auth.requires_login()"),
>>   
>>  //so of course that is expected 
>> because i need to be logged in to make this request   
>>   
>>  // when a remove that python line code 
>> above ("@auth.requires_login()"), i take it perfectly  
>>
>>}
>>
>> }.start();
>>
>>
>>
>> How can i do this above? 
>>
>>
>>

-- 
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] Interact Web2Py App with Android App Security

2015-10-02 Thread Fábio Filho
I'm sorry by my english

How can i connect my android application in my web2py site using auth 
authentication (@auth.requires_login)?

I need make a secure connection between them

for example: 


Web2Py Side :

@auth.requires_login()
def get_examplet():
return "{'code':'0'}"




Android Java side: 

new Thread(){
  
  @Override
  public void run(){
  
Http.request("localhost:8080/mysite/controller/get_example") ; 
 //  < i got a refused connection because that python line code 
("@auth.requires_login()"),

   //so of course that is expected because 
i need to be logged in to make this request   

   // when a remove that python line code above 
("@auth.requires_login()"), i take it perfectly  

   }

}.start();



How can i do this above? 


-- 
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: Importing Data / Force Record ID #s To Remain As Specified in the CSV

2015-07-19 Thread Fábio Filho

Massimo,

It's doesn't works for me.

I have two columns: tbState.id and tbState.Name .
I need to keep this id because i am using it in another table.

i'm using the following code in shell tool: 
db.tbState.import_from_csv_file(open('db_tbState.csv'), map = {})


Thaks



On Thursday, January 23, 2014 at 2:39:51 PM UTC-3, Mark Billion wrote:
>
> I know that this is a dumb question, but I have a database with static 
> data entry ids 17 to 100.  When I download the CSV, it has the x.id field 
> and the corresponding number.  However, when I create a new database and 
> upload the data using the db admin, it automatically renumbers these 
> entries.  Because its static, I have been referencing it by id -- so 
> renumbering throws this off.
>
> Anything I can do? 
>

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