-
Notifications
You must be signed in to change notification settings - Fork 335
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
Datetime.datetime throws TypeError: 'Datetime' object is not callable #1139
Comments
@JonasMedu Can you try this, please: |
@lk-geimfari from mimesis.locales import Locale
from mimesis.schema import Field, Schema
_ = Field(Locale.EN)
schema = Schema(schema=lambda: {
"year": 2021,
"datetime": _("datetime.datetime", start=2021, end=2021),
"name": _("text.word"),
"company": _("company"),
"target_value": _("integer_number", start=15200.0, end=1e10),
"timestamp": _("timestamp", posix=False),
"version": _("version", pre_release=True),
"owner": _("stock_name"),
})
example = schema.create(iterations=10000) edit: not quite sure if i can close topic :) |
It is better to leave this issue open, because I did not fix the bug yet (since it is a bug). I'll close this issue on my own. |
This issue has been automatically marked as stale because it has not had activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bug report
As far as i can tell, the function "datetime" is not callable via the Schema creation.
According to the Api reference https://mimesis.name/api.html#mimesis.Datetime.datetime and the example in the getting started section i hoped i can create a schema as shown in Whats Wrong.
What's wrong
Traceback:
TypeError: 'Datetime' object is not callable
How is that should be
A dictionary
list_of_dicts
should be created.System information
Win10, Anaconda Python installation
The text was updated successfully, but these errors were encountered: