question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Choice returns UnsupportedField when used with Field

See original GitHub issue

Bug report

What’s wrong

I was attempting to use choice within Schema generation to pick from a list of options but ran into an UnsupportedField error.

It would appear that AbsrtractField returns UnsupportedField when used with on Choice provider.

Example:

>>> from mimesis.schema import Field, Schema
>>> _ = Field('en')
>>> _('choice', items=[1,2,3])
Traceback (most recent call last):
  File "C:\dev\fakemimesis\.pyenv\lib\site-packages\mimesis\schema.py", line 100, in __call__
    result = self._table[name](**kwargs)
KeyError: 'choice'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<pyshell#24>", line 1, in <module>
    _('choice', items=[1,2,3])
  File "C:\dev\fakemimesis\.pyenv\lib\site-packages\mimesis\schema.py", line 105, in __call__
    raise UnsupportedField(name)
mimesis.exceptions.UnsupportedField: Field «choice» is not supported.
>>> 

System information

Python version: 3.6.5 Mimesis version: 3.0.0 OS: Windows 10

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
lk-geimfaricommented, Feb 2, 2019

It’s done. 3.1.0 has been released. Thanks for the bug report!

1reaction
cryocaustikcommented, Feb 1, 2019

Thanks! I ended doing something similar but with a custom provider.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Supported And Unsupported Columns In SharePoint ...
Use Choice Column in SharePoint Calculated Column Formula ... The choice field with single selection is only supported in the SharePoint ...
Read more >
An error message : TF400645 Missing or unsupported field id 0
Developer Community. And when I want to create a work item, I have the error message: In my Work Item rules setting, I...
Read more >
React/Firebase -> DocumentReference.set() called with ...
set() called with invalid data. Unsupported field value: undefined (found in field lastname in document av_deliveries/[object Object])" ", it ...
Read more >
Global Option Set "data type unsupported for evaluation"
I'm working on an app that displays an edit form connected to a D365 entity called 'Contact Ext (NAC)'. Many of the fields...
Read more >
Unsupported operand types in LinkFormatter->buildUrl()
Nope, you can't. It's obviously an erroneous condition, it shouldn't happen. I had fields in migrated old content that had the options missing....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found