Skip to content

AttributeError: 'NoneType' object has no attribute value #1632

@srinivas1012

Description

@srinivas1012

I am simply trying to read messages from Kafka partition in a topic. Here is my code:

partition = 1
par=1
    #msg = consumer.poll(1.0)
partition = TopicPartition(topic, partition)
consumer.assign([partition])
offset_tuple=consumer.get_watermark_offsets(partition)
offset=offset_tuple[0]
print(offset)
#print(consumer.get_watermark_offsets(partition)[0])
partition1 = TopicPartition(topic, par,offset)
consumer.assign([partition1])
consumer.seek(partition1)
print(consumer.position([partition1]) )
msg = consumer.poll(1000000000.0)
print(msg.value())

I get an error - AttributeError: 'NoneType' object has no attribute value
I am using kafka python version 1.6.0
@edenhill and others, Can someone help me please? I am not sure why I am getting this error message?

Metadata

Metadata

Assignees

Labels

status:needs-more-infoIssues that require more information to cleanup.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy