Follow up to this (and a big Thank You for saving me a lot of digging!)

I had field names with "$" in them which caused the same error. I believe 
that the rules for field names may be the same as the rules for variable 
names. I'm guessing that trying to reference a.b.c instead of a.b[c] is 
causing the issue.

For safety sake - don't use anything in a field name that can't be part of 
an object/variable name!

Thanks again.

Tom

On Saturday, January 10, 2015 at 5:20:39 AM UTC-8, Carlos Kitu wrote:
>
> Hi, just for other developers sake to save some time.
>
> I was getting this error:
>
> <type 'exceptions.AttributeError'> 'Row' object has no attribute 'id'
>
> Versión
> web2py™ Version 2.9.11-stable+timestamp.2014.09.15.23.35.11
>
>
> Traceback (most recent call last):
>   File "./web2py/gluon/restricted.py", line 224, in restricted
>     exec ccode in environment
>   File "./web2py/applications/AlcalaFyE/controllers/appadmin.py", line 
> 671, in <module>
>   File "./web2py/gluon/globals.py", line 392, in <lambda>
>     self._caller = lambda f: f()
>   File "./web2py/applications/AlcalaFyE/controllers/appadmin.py", line 
> 341, in update
>     f='download', args=request.args[:1]))
>   File "./web2py/gluon/sqlhtml.py", line 1168, in __init__
>     self.record_id = str(record[field.name])
>   File "./web2py/gluon/dal.py", line 7529, in __getitem__
>     raise ae
> AttributeError: 'Row' object has no attribute 'id'
>
> It was quite confusing because I could create records (with appadmin or 
> smartgrid), and see them in a grid, and the problem only appeared when I 
> tried to view the record in a form.
>
> I do NEVER use international characters in field names, but as I am 
> spanish,  unintentionally wrote a Ñ character (U+00D1: N with a 
> diacritical tilde) in a field name. As soon as I replaced the Ñ with a N, 
> everything worked fine.
>  
> I'm quite a new user of web2py, and as I'm dealing with the ins and outs 
> of web2py, I repeatedly skipped such an obvious question and was looking 
> for a more subtle error.
> As I couldn't find any reference to this problem in the forum, I thought I 
> would make sense to report it.
>
> I think web2py is a great product. Good job!
>
> Best regards.
>

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

Reply via email to