On Sep 18, 2010, at 9:46 AM, Avik Basu wrote:
> 
> Sure, I'm happy to help debug.  Send me the print statements when you
> get a chance.

Here's a starting point. In gluon/html.py, you'll find this:

    if not (application and controller and function):
        raise SyntaxError, 'not enough information to build the url'

...which is where the message below is coming from. We want to see a little 
more of the state of the world here. So I'm thinking something like:

    if not (application and controller and function):
        if r:
            msg = 'URL: a=%s c=%s f=%s r.a=%s r.c=%s r.f=%s' % 
(application,controller,function,r.application,r.controller,r.function)
        else:
            msg = 'URL: a=%s c=%s f=%s r=%s' % 
(application,controller,function,r)
        raise SyntaxError, msg



> Avik
> 
> On Sep 18, 12:39 pm, Jonathan Lundell <jlund...@pobox.com> wrote:
>> On Sep 17, 2010, at 11:50 PM, Avik Basu wrote:
>> 
>> 
>> 
>>> There is nowhere I can see that I am altering request in the models.
>>> What is the specific reason that request would break the URL
>>> function?  Any other ideas what the problem could be?
>> 
>> The URL function requires, at a minimum, app, controller and function names. 
>> In a call like the one that's blowing out, that supplies only a function 
>> name, the app & controller names come from request, which URL knows about 
>> magically.
>> 
>> I'm at a loss here; I was hoping Massimo might have an idea.
>> 
>> If you're willing, I can give you a debug print or two to stick in there, 
>> and at least we can see what's missing, exactly.
>> 
>> 
>> 
>> 
>> 
>>> Avik
>> 
>>> On Sep 17, 7:57 pm, Jonathan Lundell <jlund...@pobox.com> wrote:
>>>> On Sep 17, 2010, at 4:44 PM, Avik Basu wrote:
>> 
>>>>> Yes, I'm sure I'm running 1.85.2.  i copied over appadmin.py and the
>>>>> associated views to my applications.  What is strange though is that I
>>>>> can run the welcome app without any problem (http://127.0.0.1:8000/
>>>>> welcome/appadmin/index), but not the version I copied into my
>>>>> application (http://127.0.0.1:8000/FWv9_1_Avik/appadmin/index).  Is
>>>>> there some other file I need to copy?
>> 
>>>> I'm not seeing anything.
>> 
>>>> Is it possible that you're altering request in your model(s)?
>> 
>>>>> Avik
>> 
>>>>> On Sep 17, 7:24 pm, Jonathan Lundell <jlund...@pobox.com> wrote:
>>>>>> On Sep 17, 2010, at 4:06 PM, Avik Basu wrote:
>> 
>>>>>>> Hi,
>> 
>>>>>>> I get the following error in appadmin.py which I copied over from the
>>>>>>> welcome app in version 1.85.2:
>> 
>>>>>> Are you running 1.85.2? It sounds like you might be running something 
>>>>>> earlier.
>> 
>>>>>>> Traceback (most recent call last):
>>>>>>>  File "/Volumes/Data/avikbasu/web2py/gluon/restricted.py", line 188,
>>>>>>> in restricted
>>>>>>>    exec ccode in environment
>>>>>>>  File "/Volumes/Data/avikbasu/web2py/applications/FWv9_1_Avik/
>>>>>>> controllers/appadmin.py", line 40, in <module>
>>>>>>>    URL('index')], [T('state'), False,
>>>>>>>  File "/Volumes/Data/avikbasu/web2py/gluon/html.py", line 188, in URL
>>>>>>>    raise SyntaxError, 'not enough information to build the url'
>>>>>>> SyntaxError: not enough information to build the url
>> 
>>>>>>> Any ideas?
>> 
>>>>>>> Thanks,
>>>>>>> Avik


Reply via email to