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.

AttributeError: '_SpecialForm' object has no attribute 'avro_schema_to_python'

See original GitHub issue

Given a class such as this:

@dataclass
class BaseSchema(AvroModel):
    message_metadata: Dict[str, Any]

To Reproduce calling schema = BaseSchema.avro_schema() produces the error AttributeError: '_SpecialForm' object has no attribute 'avro_schema_to_python'

Expected behavior It should return the schema

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
marcosschrohcommented, Feb 12, 2021

Hi @leoscalco,

Do you mean that is not working for datetimes that are represented as timestamp? If that is the case, we do not have support for that. The logical types supported are: https://marcosschroh.github.io/dataclasses-avroschema/logical_types/

Maybe we can do something about it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting '_SpecialForm' object has no attribute '__name__' #243
I'm getting this error running monkeytype 21.5 on python 3.8: monkeytype run -m pytest tests Failed collecting trace Traceback (most recent ...
Read more >
Why am I getting AttributeError: Object has no attribute? [closed]
Your indentation is goofed, and you've mixed tabs and spaces. Run the script with python -tt to verify.
Read more >
AttributeError: 'module' object has no attribute and ImportError
This video covers the AttributeError : 'module' object has no attribute and ImportError: No module name errors in Python.
Read more >
Python AttributeError — What is it and how do you fix it?
AttributeError : '***' object has no attribute '***'What is an AttributeError in Python? What can you do to fix it? When does it...
Read more >
AttributeError: 'function' object has no attribute 'service_context'
Error - AttributeError: 'function' object has no attribute 'service_context'. Hi all,. I am trying out some code on Azure machine learning ...
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