Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'rfind' #73

Open
zopyx opened this issue Feb 21, 2019 · 0 comments
Open

AttributeError: 'NoneType' object has no attribute 'rfind' #73

zopyx opened this issue Feb 21, 2019 · 0 comments

Comments

@zopyx
Copy link
Member

zopyx commented Feb 21, 2019

Plone 5.1/5.2

This error occurs when you create an object with image content over plone.restapi where you do not specify an explicit filename for the image. Neither Plone nor plone.restapi check the existence of a filename for image content. Not passing a filename leads to this error when trying to edit -> save the related content object.

Perhaps the condition should be an and condition

https://github.com/plone/plone.formwidget.namedfile/blob/master/plone/formwidget/namedfile/widget.py#L272

I am not sure about the overall impact or the overall importance of the filename value in general.

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module plone.z3cform.layout, line 63, in __call__
  Module plone.z3cform.layout, line 47, in update
  Module plone.dexterity.browser.edit, line 58, in update
  Module plone.z3cform.fieldsets.extensible, line 65, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 141, in update
  Module z3c.form.group, line 52, in update
  Module z3c.form.group, line 48, in updateWidgets
  Module z3c.form.field, line 277, in update
  Module z3c.form.browser.text, line 36, in update
  Module z3c.form.browser.widget, line 171, in update
  Module Products.CMFPlone.patches.z3c_form, line 47, in _wrapped
  Module z3c.form.widget, line 88, in update
  Module plone.formwidget.namedfile.widget, line 273, in extract
  Module plone.namedfile.utils, line 42, in safe_basename
AttributeError: 'NoneType' object has no attribute 'rfind'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant