Accommodate (ignore) content with no __name__

Bug #1656439 reported by Paul Everitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL4
Fix Released
Medium
Jim Fulton

Bug Description

AttributeError: 'CommunityFile' object has no attribute '__name__'

 - Expression: "${ri.url}"
 - Filename: /srv/osfkarl/production/92/eggs/osi-4.3.1-py2.7.egg/osi/views/templates/profile.pt
 - Location: (121:23)

 - Source: <a href="${ri.url}">${ri.title}</a></td>
                        ^^^^^^^^^
 - Arguments: profile: {...} (36)
               repeat: {...} (0)
               renderer_name: templates/profile.pt
               tags: <list - at 0x99fb128cL>
               preferred_communities: <NoneType - at 0xb76ef3ccL>
               head_data: <script type="text/javascript">\nwindow._karl_clien...
               actions: <list - at 0x9a1ab5acL>
               renderer_info: <RendererHelper - at 0xb053fe6cL>
               api: <TemplateAPI - at 0xa5ed346cL>
               communities: <list - at 0x9a1ab06cL>
               recent_items: <list - at 0x99fb186cL>
               recent_url: https://karl.soros.org/profiles/asingh01/recent_co...
               request: <Request - at 0x9a3fe6ccL>
               context: <Profile asingh01 at 0xa0ebc76cL>
               photo: <CommunityFile photo at 0x9a3b7c2cL>
               my_communities: <list - at 0x99fb16acL>
               view: <function osi_show_profile_view at 0xb05993e4L>
Exception when processing https://karl.soros.org/profiles/xxxxx/?status_message=Profile%20edited
Referer: https://karl.soros.org/profiles/asingh01/edit_profile.html

Traceback (most recent call last):
  File "/srv/osfkarl/production/92/eggs/pyramid-1.2.1-py2.7.egg/pyramid/tweens.py", line 17, in excview_tween
    response = handler(request)
  File "/srv/osfkarl/production/92/eggs/pyramid_tm-0.5-py2.7.egg/pyramid_tm/__init__.py", line 107, in tm_tween
    return response
  File "/srv/osfkarl/production/92/eggs/pyramid_tm-0.5-py2.7.egg/pyramid_tm/__init__.py", line 75, in __exit__
    return self._retry_or_raise(t, v, tb)
  File "/srv/osfkarl/production/92/eggs/pyramid_tm-0.5-py2.7.egg/pyramid_tm/__init__.py", line 60, in _retry_or_raise
    reraise(t, v, tb) # otherwise reraise the exception
  File "/srv/osfkarl/production/92/eggs/pyramid_tm-0.5-py2.7.egg/pyramid_tm/__init__.py", line 100, in tm_tween
    response = handler(request)
  File "/srv/osfkarl/production/92/eggs/pyramid-1.2.1-py2.7.egg/pyramid/router.py", line 153, in handle_request
    response = view_callable(context, request)
  File "/srv/osfkarl/production/92/eggs/pyramid-1.2.1-py2.7.egg/pyramid/config/views.py", line 186, in _secured_view
    return view(context, request)
  File "/srv/osfkarl/production/92/eggs/pyramid-1.2.1-py2.7.egg/pyramid/config/views.py", line 311, in rendered_view
    context)
  File "/srv/osfkarl/production/92/eggs/pyramid-1.2.1-py2.7.egg/pyramid/renderers.py", line 393, in render_view
    return self.render_to_response(response, system, request=request)
  File "/srv/osfkarl/production/92/eggs/pyramid-1.2.1-py2.7.egg/pyramid/renderers.py", line 422, in render_to_response
    result = self.render(value, system_values, request=request)
  File "/srv/osfkarl/production/92/eggs/pyramid-1.2.1-py2.7.egg/pyramid/renderers.py", line 418, in render
    result = renderer(value, system_values)
  File "/srv/osfkarl/production/92/eggs/pyramid-1.2.1-py2.7.egg/pyramid/chameleon_zpt.py", line 49, in __call__
    result = self.template(**system)
  File "/srv/osfkarl/production/92/eggs/Chameleon-2.8.2-py2.7.egg/chameleon/template.py", line 125, in __call__
    return self.render(**kwargs)
  File "/srv/osfkarl/production/92/eggs/Chameleon-2.8.2-py2.7.egg/chameleon/zpt/template.py", line 258, in render
    return super(PageTemplate, self).render(**vars)
  File "/srv/osfkarl/production/92/eggs/Chameleon-2.8.2-py2.7.egg/chameleon/template.py", line 191, in render
    raise_with_traceback(exc, tb)
  File "/srv/osfkarl/production/92/eggs/Chameleon-2.8.2-py2.7.egg/chameleon/template.py", line 172, in render
    self._render(stream, econtext, rcontext)
  File "profile_b9d327438c153307d79f4813ce90e24b718c8a67.py", line 2642, in render
  File "/srv/osfkarl/production/92/eggs/Chameleon-2.8.2-py2.7.egg/chameleon/zpt/template.py", line 262, in include
    self._render(*args, **kwargs)
  File "generic_layout_35d38e7c431666d11f92e8ddc2412b5df2747379.py", line 1587, in render
  File "profile_b9d327438c153307d79f4813ce90e24b718c8a67.py", line 2354, in __fill_content
  File "/srv/osfkarl/production/92/eggs/Chameleon-2.8.2-py2.7.egg/chameleon/py26.py", line 8, in lookup_attr
    raise exc
AttributeError: 'CommunityFile' object has no attribute '__name__'

 - Expression: "${ri.url}"
 - Filename: /srv/osfkarl/production/92/eggs/osi-4.3.1-py2.7.egg/osi/views/templates/profile.pt
 - Location: (121:23)

 - Source: <a href="${ri.url}">${ri.title}</a></td>
                        ^^^^^^^^^
 - Arguments: profile: {...} (36)
               repeat: {...} (0)
               renderer_name: templates/profile.pt
               tags: <list - at 0x99fb128cL>
               preferred_communities: <NoneType - at 0xb76ef3ccL>
               head_data: <script type="text/javascript">\nwindow._karl_clien...
               actions: <list - at 0x9a1ab5acL>
               renderer_info: <RendererHelper - at 0xb053fe6cL>
               api: <TemplateAPI - at 0xa5ed346cL>
               communities: <list - at 0x9a1ab06cL>
               recent_items: <list - at 0x99fb186cL>
               recent_url: https://karl.soros.org/profiles/asingh01/recent_co...
               request: <Request - at 0x9a3fe6ccL>
               context: <Profile xxx at 0xa0ebc76cL>
               photo: <CommunityFile photo at 0x9a3b7c2cL>
               my_communities: <list - at 0x99fb16acL>
               view: <function osi_show_profile_view at 0xb05993e4L>

Tags: jsonindex
Jim Fulton (jim-zope)
summary: - Accommodate orphans with no creator
+ Accommodate (ignore) content with no __name__
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

I believe this is done, right?

Revision history for this message
Jim Fulton (jim-zope) wrote :

Yes

Changed in karl4:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.