According to 
this: https://groups.google.com/forum/?fromgroups=#!topic/web2py/p-w38Wh1d0I


Just replace  element = element.copy() with  element = dict(element) 
on template.py, or better, convert rows to dicts in your app: 

    # read elements from db 
    elements = 
db(db.pdf_element.pdf_template_id==1).select(orderby=db.pdf_element.priority) 

    # convert rows to dicts due a web2py internal change (see issue 1255) 
    # this prevents AttributeError('Row' object has no attribute 'copy') 
    elements = [element.as_dict() for element in elements] 

On Tuesday, March 19, 2013 12:59:19 AM UTC-7, Kenneth wrote:
>
> Hello,
>
> upgrading didn't in this case, still getting the same error. 
>
>
> Kenneth
>
> Den tisdagen den 19:e mars 2013 kl. 04:11:59 UTC skrev Massimo Di Pierro:
>>
>> Please try 2.4.5. Let us know if this is not fixed alreday.
>>
>> On Monday, 18 March 2013 19:42:38 UTC-5, Kenneth wrote:
>>>
>>> Hello,
>>>
>>> I'm getting: 
>>>
>>> <type 'exceptions.AttributeError'> 'Row' object has no attribute 'copy' 
>>> Version  web2py™ (2, 4, 2, 'stable', datetime.datetime(2013, 3, 4, 3, 
>>> 26, 21))  Python Python 2.6.5: /usr/bin/python (prefix: /usr)  Traceback 
>>>
>>> 1.
>>> 2.
>>> 3.
>>> 4.
>>> 5.
>>> 6.
>>> 7.
>>> 8.
>>> 9.
>>> 10.
>>> 11.
>>> 12.
>>> 13.
>>> 14.
>>>
>>> Traceback (most recent call last):
>>>   File "/data/domains/web2py/gluon/restricted.py", line 212, in restricted
>>>     exec ccode in environment
>>>   File "/data/domains/web2py/applications/xxxxx/controllers/billing.py" 
>>> <https://www.phvk.fi/admin/edit/phvk/controllers/billing.py>, line 873, in 
>>> <module>
>>>   File "/data/domains/web2py/gluon/globals.py", line 193, in <lambda>
>>>     self._caller = lambda f: f()
>>>   File "/data/domains/web2py/gluon/tools.py", line 2942, in f
>>>     return action(*a, **b)
>>>   File "/data/domains/web2py/applications/xxxxx/controllers/billing.py" 
>>> <https://www.phvk.fi/admin/edit/phvk/controllers/billing.py>, line 779, in 
>>> show_pdf_bill
>>>     return f.render('invoice.pdf', dest='S')
>>>   File "/data/domains/web2py/gluon/contrib/pyfpdf/template.py", line 101, 
>>> in render
>>>     element = element.copy()
>>> AttributeError: 'Row' object has no attribute 'copy'
>>>
>>> Error snapshot [image: help] 
>>> <https://www.phvk.fi/admin/default/ticket/phvk/217.152.236.190.2013-03-18.15-47-53.11d8d47e-f481-432b-92b2-532afef1692c#>
>>>  
>>>
>>> <type 'exceptions.AttributeError'>('Row' object has no attribute 'copy') 
>>>
>>> Where should I start looking for the error?
>>>
>>>
>>> Kenneth
>>>
>>>
>>>

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to