[web2py] Re: 2.0.6 on GAE - Routing issues and ticket unrecoverable

2012-09-03 Thread Udi Milo
I've reinstalled the distribution and now I do get a ticket when I 
fabricate an error, but when I go to:

http://127.0.0.1:8080/admin/default/ticket/welcome/127.0.0.1.2012-09-03.04-35-34.686f53b3-db23-4cf7-82bb-0af5c0eee05d

I get:

invalid function (default/admin)


Which means that somehow it doesn't know about the admin app in the 
applications folder...
my routes.py is:

routers = dict(

# base router
BASE = dict(
default_application = 'welcome'
),
)


any ideas?

On Sunday, September 2, 2012 8:38:22 PM UTC-7, Massimo Di Pierro wrote:
>
> Normally admin is disabled in app.yaml although that does not see to be 
> your problem.
>
> If you get an unrecoverable thicket there should be a log in gae log. 
> Please let us know what you see.
>
> On Sunday, 2 September 2012 18:11:09 UTC-5, Udi Milo wrote:
>>
>> Hi,
>>
>> Decided to start fresh a new project with 2.0.6 on GAE.
>> downloaded it,
>> unzipped,
>> created app.yaml,
>> created routes.py
>>
>> ran it in PyDev and welcome comes out fine.
>> I cannot go to admin app for some reason, and every error is 
>> ticket unrecoverable.
>>
>> Any idea how to debug it or solutions?
>>
>

-- 





[web2py] 2.0.6 on GAE - Routing issues and ticket unrecoverable

2012-09-02 Thread Udi Milo
Hi,

Decided to start fresh a new project with 2.0.6 on GAE.
downloaded it,
unzipped,
created app.yaml,
created routes.py

ran it in PyDev and welcome comes out fine.
I cannot go to admin app for some reason, and every error is 
ticket unrecoverable.

Any idea how to debug it or solutions?

-- 





Re: [web2py] Twitter OAuth lib

2012-06-03 Thread Udi Milo
can you point me to an example or where can I find the code?

On Sunday, June 3, 2012 4:35:57 AM UTC-4, mcm wrote:
>
> Twitter oauth is supported by web2py natively.
>
> mic
> Il giorno 03/giu/2012 02:37, "Udi Milo"  ha scritto:
>
>> I want to allow my users to connect a Twitter account to their account.
>> Which python lib do you recommend using?
>>
>> Twython uses requests which I'm having difficulty running on 2.5.4 and I 
>> have not tried any other yet.
>>
>>  

[web2py] Twitter OAuth lib

2012-06-02 Thread Udi Milo
I want to allow my users to connect a Twitter account to their account.
Which python lib do you recommend using?

Twython uses requests which I'm having difficulty running on 2.5.4 and I have 
not tried any other yet.



Re: [web2py] Hebrew encoding

2012-06-02 Thread Udi Milo
What I want to do is just to get the & characters into Hebrew, and I 
don't want to touch the rest. I don't care that it has invalid HTML tags.
I don't understand how an encoding method has an exception on invalid 
tags... how are the two issues related?


On Saturday, June 2, 2012 1:46:18 AM UTC-4, mweissen wrote:
>
> Hi Udi,
>
> I have tried it once again.
> I had to change from   to  and from  to .
> "unescape" works now!
>
> But it would be interesting to learn about more this problem. Could you 
> please answer Massimos questions? 
>
> 2012/6/2 Massimo Di Pierro 
>
>> I am not sure there is an error here. Is the problem that the characters 
>> are not dissplayed properly? Are you using a custom layout? If so, is it 
>> setting the utf8 encoding or does it tell the browser it is latin1?
>>
>> On Friday, 1 June 2012 15:45:45 UTC-5, Udi Milo wrote:
>>>
>>> It does, but not completely,
>>>
>>> As it turns out what I copy pasted was part of it, and your function 
>>> does work perfectly. when I try to run it on the entire text, I get errors 
>>> that I can't figure our, maybe you can help me once more?
>>> here is the complete text:
>>>
>>> 
>>> 
>>> ...
>>>
>>
>>> 
>>>
>>> Thanks!
>>>
>>>
>>> On Friday, June 1, 2012 1:45:32 AM UTC-4, mweissen wrote:
>>>>
>>>> I have found at 
>>>> http://wiki.python.org/moin/**EscapingXml<http://wiki.python.org/moin/EscapingXml>
>>>> :
>>>>
>>>> import xml.parsers.expat
>>>>
>>>> def unescape(s):
>>>> want_unicode = False
>>>> if isinstance(s, unicode):
>>>> s = s.encode("utf-8")
>>>> want_unicode = True
>>>>
>>>> # the rest of this assumes that `s` is UTF-8
>>>> list = []
>>>>
>>>> # create and initialize a parser object
>>>> p = xml.parsers.expat.**ParserCreate("utf-8")
>>>> p.buffer_text = True
>>>> p.returns_unicode = want_unicode
>>>> p.CharacterDataHandler = list.append
>>>>
>>>> # parse the data wrapped in a dummy element
>>>> # (needed so the "document" is well-formed)
>>>> p.Parse("", 0)
>>>> p.Parse(s, 0)
>>>> p.Parse("", 1)
>>>>
>>>> # join the extracted strings and return
>>>> es = ""
>>>> if want_unicode:
>>>> es = u""
>>>> return es.join(list)
>>>>
>>>> With
>>>>
>>>> t="""מפת&#**x5D7;ים 
>>>> רבים מבקש&#**x5D9;ם 
>>>> את עזרת&#**x5D9; 
>>>> בפתר&#**x5D5;ן 
>>>> בעיו&#**x5EA; של 
>>>> ביצו&#**x5E2;י Visual Studio. 
>>>> \nבד”&#**x5DB; את רוב 
>>>> הבעי&#**x5D5;ת 
>>>> ניתן לפתו&#**x5E8; 
>>>> יחסי&#**x5EA; 
>>>> בקלו&#**x5EA;, 
>>>> \nוככל שעוב&#**x5E8; 
>>>> הזמן אני 
>>>> מוצא את עצמי 
>>>> מספק פחות או 
>>>> יותר את אותן 
>>>> התשו&#**x5D1;ות, \nמה 
>>>> שגרם לי לחשו&#
>>>> **x5D1; שכנר&#**x5D0;ה 
>>>> הגיע הזמן 
>>>> להעל&#**x5D5;ת 
>>>> אותן בצור&#**x5D4; 
>>>> מסוד&#**x5E8;ת 
>>>> לפוס&#**x5D8;."""
>>>> print unescape (t)
>>>>
>>>> the result is
>>>>
>>>> מפתחים רבים מבקשים את עזרתי בפתרון בעיות של ביצועי Visual Studio. 
>>>> בד”כ את רוב הבעיות ניתן לפתור יחסית בקלות, 
>>>> וככל שעובר הזמן אני מוצא את עצמי מספק פחות או יותר את אותן התשובות, 
>>>> מה שגרם לי לחשוב שכנראה הגיע הזמן להעלות אותן בצורה מסודרת לפוסט.
>>>>
>>>> I hope it helps.
>>>> Regards Martin
>>>>
>>>> 2012/6/1 Udi Milo 
>>>>
>>>>> part of my product receives user text, saves it and shows it later.
>>>>>
>>>>> one of my users added a hebrew text attached below and I do not know 
>>>>> how to translate it into letter instead of hex.
>>>>> simple text.encode('UTF-8') doesn't work, and I am far from being an 
>>>>> expert in the subject. can someone help me out?
>>>>>
>>>>> see attached text:
>>>>>
>>>>> מפתח&#**x5D9;ם 
>>>>> רבים מבקש&#**x5D9;ם 
>>>>> את עזרת&#**x5D9; 
>>>>> בפתר&#**x5D5;ן 
>>>>> בעיו&#**x5EA; של 
>>>>> ביצו&#**x5E2;י Visual Studio. 
>>>>> בד”כ את רוב 
>>>>> הבעי&#**x5D5;ת 
>>>>> ניתן לפתו&#**x5E8; 
>>>>> יחסי&#**x5EA; בקלו&#**
>>>>> x5EA;, 
>>>>> וככל שעוב&#**x5E8; 
>>>>> הזמן אני 
>>>>> מוצא את עצמי 
>>>>> מספק פחות או 
>>>>> יותר את אותן 
>>>>> התשו&#**x5D1;ות, 
>>>>> מה שגרם לי 
>>>>> לחשו&#**x5D1; 
>>>>> שכנר&#**x5D0;ה 
>>>>> הגיע הזמן 
>>>>> להעל&#**x5D5;ת 
>>>>> אותן בצור&#**x5D4; 
>>>>> מסוד&#**x5E8;ת 
>>>>> לפוס&#**x5D8;.
>>>>>
>>>>
>>>>
>>>>
>>>> 

[web2py] Hebrew encoding

2012-05-31 Thread Udi Milo
part of my product receives user text, saves it and shows it later.

one of my users added a hebrew text attached below and I do not know how to 
translate it into letter instead of hex.
simple text.encode('UTF-8') doesn't work, and I am far from being an expert 
in the subject. can someone help me out?

see attached text:

מפתחים רבים 
מבקשים את 
עזרתי 
בפתרון 
בעיות של 
ביצועי Visual Studio. 
בד”כ את רוב 
הבעיות ניתן 
לפתור יחסית 
בקלות, 
וככל שעובר 
הזמן אני 
מוצא את עצמי 
מספק פחות או 
יותר את אותן 
התשובות, 
מה שגרם לי 
לחשוב 
שכנראה הגיע 
הזמן להעלות 
אותן בצורה 
מסודרת 
לפוסט.


[web2py] 3rd party login hooks

2012-04-10 Thread Udi Milo
Hi,

I was wondering if the 3rd party login integration (I'm using linkedIn to 
logic) has a hook I can use in my linkedinAccount.py that is called every 
time a user logs in or the first time she logs in?
I want to hold the user from the db in my hand and refresh a cache object.

get_user is not the way to go as far as I understand... any ideas?


[web2py] LinkedIn Integration - my step by step tutorial

2012-04-03 Thread Udi Milo
It took a while to figure out, but this is my version on how to use 
linkedIn in web2py,
comments are much appreciated. (its very detailed and intended for people 
that are just starting out like me)

Enjoy!

first thing, go to linkedIn.com and get your key and secret.
after getting it:

*1. add linkedIn.py and model.py to Modules from the python-linkedin lib*
*2. add the linkedinAccount.py to modules. modify it to look like:*

from gluon.http import HTTP
try:
import linkedin
except ImportError:
raise HTTP(400,"linkedin module not found")

class LinkedInAccount(object):
def __init__(self,request,session,key,secret,return_url):
self.request = request
self.session = session

if self.session.linkedin is None:
self.session.verified = False
self.session.linkedin = 
linkedin.LinkedIn(key,secret,return_url, gae=True)
self.session.linkedin.request_token()

def verify(self, verifier):
self.session.verified = verifier and 
self.session.linkedin.access_token(verifier = verifier)
return self.session.verified

def login_url(self, next="/"):
return self.session.linkedin.get_authorize_url()

def logout_url(self, next="/"):
self.session.linkedin = None
return next

def get_user(self):
if self.session.verified:
profile = self.session.linkedin.get_profile(fields=['id', 
'first-name', 'last-name','picture-url','industry'])
return dict(first_name = profile.first_name,
last_name = profile.last_name,
picture_url = profile.picture_url,
industry = profile.industry,
username = profile.id)

*3. add the following to your dal.py*

## LinkedIn
auth.settings.actions_disabled=['register','change_password','request_reset_password','retrieve_username']
from linkedinAccount import LinkedInAccount
auth.settings.login_form=LinkedInAccount(
request,
session,
KEY,
SECRET,
'http://' + request.env.http_host + '/user/verify')

and just above "auth.define_tables()" add this:

## create custom field 'username' for linkedin authentication
auth.settings.extra_fields['auth_user']= [
Field('username', writable=False, readable=False),
Field('picture_url', writable=False, readable=False),
Field('industry', writable=False, readable=False),
]

*4. add the following to your default.py, the user function (clear is a 
debug tool, in case your session expires or you play with it and you need 
to remove it)*

def user():
if len(request.args)>0 and request.args(0)=='verify':
auth.settings.login_form.verify(request.vars.oauth_verifier)
redirect(URL('user', 'login'))

if request.args(0)=='clear':
session.linkedin = None
return 'clean'




[web2py] LinkedIn Integration - Tutorial needed

2012-03-27 Thread Udi Milo
Hi,

For a while now I've been trying to get the linkedIn module to work as 
described in the book and in different posts around the web, without 
success.
Can someone who has done it please describe how this can be achieved?

Thanks!


[web2py] Re: DAL Challenge

2012-03-27 Thread Udi Milo
Thanks!

I'm trying to follow the logic of your suggestion all the way to rendering 
it, tell me if you have a better idea:
once I hold the list of articles I want to show, I run over the list and 
get all the comment ids, I issue a large query with the ids of all comments 
for all articles together, pass it to the view as a large dictionary that 
has a key of article id and value list of comments and use it like that?


On Tuesday, March 27, 2012 6:11:46 AM UTC-4, Wikus van de Merwe wrote:
>
> When working with GAE datastore you want to execute minimum number of 
> queries necessary to avoid delays and
> limit the use of DB API calls. Fetching comments one by one is not the 
> best option then (even if done with ajax).
>
> Probably the most efficient way would be to store the list of comment ids 
> as an attribute of each article entity. Then
> you could get all comment ids with a single query. Having the ids you 
> could build a list of GAE keys, and fetch all
> needed comment entities at once. We discussed that recently here:
> https://groups.google.com/d/topic/web2py/7dvo_jqIR38/discussion
>
> I'm also guessing that this might be quite common GAE use case and you 
> might find a better solution already optimised
> for this on GAE forum. The other option is to show comments only on the 
> article individual page (not on the list of articles).
>
> If you use the wrapper for caching, then you could memorize the entire 
> response, so this is very efficient as the views
> are not rendered but read straight from cache. If you need some extra 
> parametrisation inside the controller you could
> either move some of the code to a separate function which output is cached 
> or simply cache only the queries:
> http://web2py.com/books/default/chapter/29/6#Caching-selects
>
>

[web2py] DAL Challenge

2012-03-26 Thread Udi Milo
Hi guys,

I have an entity called article.
I want to build the ability to comment on each article. comment at least 
need (created_on, user_id, article_id, text)
I'm running on GAE.

On my index page I'm showing 30-60 articles and I want each article to have 
its comments showing. how would you do it?
a. sending the data when the page loads? if so, how? DAL or DAL + cache?
b. load without it and use ajax to call each item separately?

also, a random cache question:

@cache('key',5)
function test(x):
   return x

Can I somehow get my parameter x into the key?


[web2py] Re: efficient DB queries

2012-03-21 Thread Udi Milo
I went with:

query = ''
for id in board_ids:
query += 'db(db.board.id==%d).select()|' %id
query = query[:-1]
boards = eval(query)

I have no idea how to evaluate performance of that query though
if you have any other ideas (I cannot limit 30 right now without rethinking 
other things), please share them.

On Wednesday, March 21, 2012 11:52:33 PM UTC-4, Anthony wrote:
>
> I think that is outdated -- according to this (
> https://groups.google.com/d/msg/web2py/vWqOET74qg4/92DLUFTUsN0J), GAE 
> does now support belongs but is limited to 30 items per query (so you have 
> to break it up). Perhaps there is a better way, though.
>
> Anthony
>
> On Wednesday, March 21, 2012 9:26:44 PM UTC-4, Udi Milo wrote:
>>
>> It doesn't.
>> I found this: 
>> """"
>> GAE does not support belongs and does not support OR. You have to do: 
>>
>> rows = db(db.media_type.name=='paper').select()&db 
>> (db.media_type.name=='cd').select() 
>>
>> The & is done at the web2py level but since records are exclusive and 
>> you are not sorting them, there is no major slowdown. 
>> """""
>>
>> Since I'm a python newbie, how would you go about building the loop that 
>> creates a very long query? you need to do some kind of python eval tricks 
>> here that I don't know.
>> I'm guessing its going to look like
>>
>> for id in board_ids:
>>query = query + new query(id)
>>
>> but how do you do it in python?
>>
>> On Wednesday, March 21, 2012 8:30:54 PM UTC-4, Anthony wrote:
>>>
>>> I didn't realize you were on GAE. I'm not quite sure how GAE handles 
>>> this, so perhaps someone with more GAE experience can chime in. In an 
>>> RDBMS, you should be able to do:
>>>
>>> board_ids = set([a.board for a in articles])
>>> boards = db(db.boards.id.belongs(board_ids)).select()
>>>
>>> But not sure if that works on GAE.
>>>
>>> Anthony
>>>
>>> On Wednesday, March 21, 2012 7:30:58 PM UTC-4, Udi Milo wrote:
>>>>
>>>> Anthony,
>>>>
>>>> Thanks for answering so quickly.
>>>> I did mean board and not board_id
>>>>
>>>> My question is very basic.
>>>> I know that the article table has an Id column that is really the board 
>>>> reference, but when I look at the result of the query and unification of:
>>>> board_ids = set(map(lambda a: a.board, articles))
>>>>
>>>> I get a set of references,
>>>> how do I use that set in another query to get all the boards?
>>>> also, just to be sure, running this lambda expression does not hit the 
>>>> db to fetch the boards, right?
>>>>
>>>> I can't use join b/c I'm running on GAE.
>>>>
>>>>
>>>>
>>>> On Wednesday, March 21, 2012 5:22:50 PM UTC-4, Anthony wrote:
>>>>>
>>>>> I have two db tables:
>>>>>>
>>>>>> board (name, created_on)
>>>>>> article(board, name, title)
>>>>>>
>>>>>> currently, in my html I do a naive loop {{for article in articles}} 
>>>>>> {{=article.board.name}} {{pass}}
>>>>>>
>>>>>> I would like to change it and do something like:
>>>>>> articles = db.select.all...
>>>>>> board_ids = set(map(lambda a: a.board_id, articles))
>>>>>>
>>>>>
>>>>> Instead of a.board_id, do you mean a.board (I don't see a "board_id" 
>>>>> field listed in your article table definition)? Also, is db.article.board 
>>>>> a 
>>>>> reference field to the db.board table? In that case, that means it is 
>>>>> already storing the id of the referenced record in the db.board table 
>>>>> (that's what reference fields store), so you don't need to retrieve it 
>>>>> separately.
>>>>>
>>>>> Anyway, if you need the db.board.name value for all the records you 
>>>>> are selecting from the db.article table, you should probably just do a 
>>>>> join 
>>>>> so you can get everything in a single query -- see 
>>>>> http://web2py.com/books/default/chapter/29/6#Inner-joins.
>>>>>  
>>>>> Anthony
>>>>>
>>>>>

[web2py] Re: efficient DB queries

2012-03-21 Thread Udi Milo
It doesn't.
I found this: 
""""
GAE does not support belongs and does not support OR. You have to do: 

rows = db(db.media_type.name=='paper').select()&db 
(db.media_type.name=='cd').select() 

The & is done at the web2py level but since records are exclusive and 
you are not sorting them, there is no major slowdown. 
"""""

Since I'm a python newbie, how would you go about building the loop that 
creates a very long query? you need to do some kind of python eval tricks 
here that I don't know.
I'm guessing its going to look like

for id in board_ids:
   query = query + new query(id)

but how do you do it in python?

On Wednesday, March 21, 2012 8:30:54 PM UTC-4, Anthony wrote:
>
> I didn't realize you were on GAE. I'm not quite sure how GAE handles this, 
> so perhaps someone with more GAE experience can chime in. In an RDBMS, you 
> should be able to do:
>
> board_ids = set([a.board for a in articles])
> boards = db(db.boards.id.belongs(board_ids)).select()
>
> But not sure if that works on GAE.
>
> Anthony
>
> On Wednesday, March 21, 2012 7:30:58 PM UTC-4, Udi Milo wrote:
>>
>> Anthony,
>>
>> Thanks for answering so quickly.
>> I did mean board and not board_id
>>
>> My question is very basic.
>> I know that the article table has an Id column that is really the board 
>> reference, but when I look at the result of the query and unification of:
>> board_ids = set(map(lambda a: a.board, articles))
>>
>> I get a set of references,
>> how do I use that set in another query to get all the boards?
>> also, just to be sure, running this lambda expression does not hit the db 
>> to fetch the boards, right?
>>
>> I can't use join b/c I'm running on GAE.
>>
>>
>>
>> On Wednesday, March 21, 2012 5:22:50 PM UTC-4, Anthony wrote:
>>>
>>> I have two db tables:
>>>>
>>>> board (name, created_on)
>>>> article(board, name, title)
>>>>
>>>> currently, in my html I do a naive loop {{for article in articles}} {{=
>>>> article.board.name}} {{pass}}
>>>>
>>>> I would like to change it and do something like:
>>>> articles = db.select.all...
>>>> board_ids = set(map(lambda a: a.board_id, articles))
>>>>
>>>
>>> Instead of a.board_id, do you mean a.board (I don't see a "board_id" 
>>> field listed in your article table definition)? Also, is db.article.board a 
>>> reference field to the db.board table? In that case, that means it is 
>>> already storing the id of the referenced record in the db.board table 
>>> (that's what reference fields store), so you don't need to retrieve it 
>>> separately.
>>>
>>> Anyway, if you need the db.board.name value for all the records you are 
>>> selecting from the db.article table, you should probably just do a join so 
>>> you can get everything in a single query -- see 
>>> http://web2py.com/books/default/chapter/29/6#Inner-joins.
>>>  
>>> Anthony
>>>
>>>

[web2py] Re: efficient DB queries

2012-03-21 Thread Udi Milo
Anthony,

Thanks for answering so quickly.
I did mean board and not board_id

My question is very basic.
I know that the article table has an Id column that is really the board 
reference, but when I look at the result of the query and unification of:
board_ids = set(map(lambda a: a.board, articles))

I get a set of references,
how do I use that set in another query to get all the boards?
also, just to be sure, running this lambda expression does not hit the db 
to fetch the boards, right?

I can't use join b/c I'm running on GAE.



On Wednesday, March 21, 2012 5:22:50 PM UTC-4, Anthony wrote:
>
> I have two db tables:
>>
>> board (name, created_on)
>> article(board, name, title)
>>
>> currently, in my html I do a naive loop {{for article in articles}} {{=
>> article.board.name}} {{pass}}
>>
>> I would like to change it and do something like:
>> articles = db.select.all...
>> board_ids = set(map(lambda a: a.board_id, articles))
>>
>
> Instead of a.board_id, do you mean a.board (I don't see a "board_id" field 
> listed in your article table definition)? Also, is db.article.board a 
> reference field to the db.board table? In that case, that means it is 
> already storing the id of the referenced record in the db.board table 
> (that's what reference fields store), so you don't need to retrieve it 
> separately.
>
> Anyway, if you need the db.board.name value for all the records you are 
> selecting from the db.article table, you should probably just do a join so 
> you can get everything in a single query -- see 
> http://web2py.com/books/default/chapter/29/6#Inner-joins.
>  
> Anthony
>
>

[web2py] efficient DB queries

2012-03-21 Thread Udi Milo
Hi,

I have two db tables:

board (name, created_on)
article(board, name, title)

currently, in my html I do a naive loop {{for article in articles}} 
{{=article.board.name}} {{pass}}

I would like to change it and do something like:
articles = db.select.all...
board_ids = set(map(lambda a: a.board_id, articles))
boards = db.selected all of the id.

my problem is:
if I do: board_ids = set(map(lambda a: a.board*.id*, articles))
it goes to fetch the board every time, to get the id.
and if I don't I have a reference and not an Id...

can someone explain how to do it efficiently in python?


UDi.





[web2py] LinkedIn integration

2012-03-21 Thread Udi Milo
Hi,

I've been trying for some time now to get linkedIn integrated into a web2py 
website running on GAE, but I can't make it work. (im a python beginner)
Can someone please help me?

here is what I did:

- added linkedin.py + model.py (from python-linkedin) to modules.
- added from gluon.contrib.login_methods.linkedin_account import 
LinkedInAccount
auth.settings.login_form=LinkedInAccount(key,secret,etc)
  to db.py

I get import errors and if I play a little with the imports (added "from 
linkedin import LinkedIn to the db.py) I get api.google.com module missing.
I want to be able to run it locally (pref. on the 127.0.0.1 machine and not 
gae dev, but I don't care about that) and be able to run it live on GAE.

your help is much appreciated.
UDi.



Re: [web2py] Modules on Google App Engine

2012-03-15 Thread Udi Milo
I found the problem (which leads to a new problem).
my module was using "import requests"
requests is http://docs.python-requests.org/en/v0.10.7/index.html that I 
have installed on my machine.
I guess I need to tell web2py to install it when it deploys.

do you know how I do that? and if its not possible, how to overcome this 
issue?

On Wednesday, March 14, 2012 11:32:20 PM UTC-4, rochacbruno wrote:
>
> I guess your module is trying to do something denied in GAE, some python 
> std modules are not available on GAE, and also you cannot access filesystem.
>
> Another common problem is incompatibility with Python2.5
>
> Take a look at LOG tab at your google app engine admin page, may be the 
> traceback is there.
>
> On Thu, Mar 15, 2012 at 12:19 AM, Udi Milo  wrote:
>
>> The thing is that locally, it works.
>> only when I deploy to GAE it is missing...
>>
>> which files do you recommend I look into to try and find the reason for 
>> this weird problem?
>>
>>
>> On Tuesday, March 13, 2012 5:32:52 PM UTC-4, rochacbruno wrote:
>>>
>>> Maybe you have a syntax error or an error with imports inside the api 
>>> module, the web2py custom importer does not shows complete traceback for 
>>> that cases.
>>>
>>> On Tue, Mar 13, 2012 at 10:48 AM, Udi Milo  wrote:
>>>
>>>> Hi all,
>>>>
>>>> I've added a new api.py file to the /modules directory.
>>>> I've also added a call from my default.py "from api import Api"
>>>>
>>>> working locally, everything is fine.
>>>> when deploying to GAE, I get 
>>>>  No module named api
>>>>
>>>> can anyone suggest an answer to my problem?
>>>>
>>>
>>>
>>>
>>> -- 
>>>
>>> Bruno Rocha
>>> [http://rochacbruno.com.br]
>>>
>>>
>
>
> -- 
>
> Bruno Rocha
> [http://rochacbruno.com.br]
>
>

Re: [web2py] Modules on Google App Engine

2012-03-14 Thread Udi Milo
The thing is that locally, it works.
only when I deploy to GAE it is missing...

which files do you recommend I look into to try and find the reason for 
this weird problem?

On Tuesday, March 13, 2012 5:32:52 PM UTC-4, rochacbruno wrote:
>
> Maybe you have a syntax error or an error with imports inside the api 
> module, the web2py custom importer does not shows complete traceback for 
> that cases.
>
> On Tue, Mar 13, 2012 at 10:48 AM, Udi Milo  wrote:
>
>> Hi all,
>>
>> I've added a new api.py file to the /modules directory.
>> I've also added a call from my default.py "from api import Api"
>>
>> working locally, everything is fine.
>> when deploying to GAE, I get 
>>  No module named api
>>
>> can anyone suggest an answer to my problem?
>>
>
>
>
> -- 
>
> Bruno Rocha
> [http://rochacbruno.com.br]
>
>

[web2py] Modules on Google App Engine

2012-03-13 Thread Udi Milo
Hi all,

I've added a new api.py file to the /modules directory.
I've also added a call from my default.py "from api import Api"

working locally, everything is fine.
when deploying to GAE, I get 
 No module named api

can anyone suggest an answer to my problem?