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

Fix TypeError when creating Dynamic Analysis Specifications #1826

Merged
merged 1 commit into from
Jul 8, 2021

Conversation

xispa
Copy link
Member

@xispa xispa commented Jul 8, 2021

Description of the issue/feature this PR addresses

A traceback occurs when creating a Dynamic Analysis Specification because of #1801 (update openpyxl to v2.6.4)

Current behavior before PR

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 371, in publish_module
  Module ZPublisher.WSGIPublisher, line 274, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module plone.z3cform.layout, line 63, in __call__
  Module plone.z3cform.layout, line 47, in update
  Module plone.dexterity.browser.add, line 141, 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 145, in update
  Module plone.app.z3cform.csrf, line 22, in execute
  Module z3c.form.action, line 98, in execute
  Module z3c.form.button, line 315, in __call__
  Module z3c.form.button, line 170, in __call__
  Module plone.dexterity.browser.add, line 112, in handleAdd
  Module z3c.form.group, line 98, in extractData
  Module z3c.form.form, line 148, in extractData
  Module z3c.form.field, line 324, in extract
  Module z3c.form.field, line 216, in validate
  Module z3c.form.validator, line 201, in validate
  Module z3c.form.validator, line 206, in validateObject
  Module zope.interface.interface, line 884, in validateInvariants
  Module bika.lims.content.dynamic_analysisspec, line 69, in validate_sepecs_file
TypeError: 'generator' object has no attribute '__getitem__'

Desired behavior after PR is merged

Can create Dynamic Analysis Specification without error

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

The following traceback occurs when trying to create a Dynamic Analysis
Specification. This is probably because of #1803 (update openpyxl to v2.6.4)

```
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 371, in publish_module
  Module ZPublisher.WSGIPublisher, line 274, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module plone.z3cform.layout, line 63, in __call__
  Module plone.z3cform.layout, line 47, in update
  Module plone.dexterity.browser.add, line 141, 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 145, in update
  Module plone.app.z3cform.csrf, line 22, in execute
  Module z3c.form.action, line 98, in execute
  Module z3c.form.button, line 315, in __call__
  Module z3c.form.button, line 170, in __call__
  Module plone.dexterity.browser.add, line 112, in handleAdd
  Module z3c.form.group, line 98, in extractData
  Module z3c.form.form, line 148, in extractData
  Module z3c.form.field, line 324, in extract
  Module z3c.form.field, line 216, in validate
  Module z3c.form.validator, line 201, in validate
  Module z3c.form.validator, line 206, in validateObject
  Module zope.interface.interface, line 884, in validateInvariants
  Module bika.lims.content.dynamic_analysisspec, line 69, in validate_sepecs_file
TypeError: 'generator' object has no attribute '__getitem__'
```
@xispa xispa added Bug 🐞 Version 2.0 Plone 5 Compatibility labels Jul 8, 2021
@xispa xispa requested a review from ramonski July 8, 2021 16:40
@ramonski ramonski merged commit 5aea78e into 2.x Jul 8, 2021
@ramonski ramonski deleted the cannot-create-dynamic-specs branch July 8, 2021 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Version 2.0 Plone 5 Compatibility
Development

Successfully merging this pull request may close these issues.

2 participants