Skip to content

"module 'os' has no attribute 'add_dll_directory'" #1530

@pradeepjaladi

Description

@pradeepjaladi

Description

Getting the above error when importing the from confluent_kafka.admin import (AdminClient, NewTopic)

How to reproduce

  1. Spin up a Amazon Linux EC2 environment
  2. Check Python3 Version (3.7.6)
  3. create a directory /usr/local/source/sample
  4. sudo pip3 install -U confluent-kafka -t python
    WARNING: Running pip install with root privileges is generally not a good idea. Try pip3 install --user instead.
    Collecting confluent-kafka
    Using cached confluent_kafka-2.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB)
    Installing collected packages: confluent-kafka
    Successfully installed confluent-kafka-2.0.2
  5. zip the python file as confluent-kafka.zip
  6. download the zip file to windows environment
  7. Create a AWS Lambda Layer using the zip file
  8. Attach the Lambda layer to the Lambda function (Python 3.9)
  9. Test the Lambda function

Checklist

Please provide the following information:

  • confluent-kafka-python and librdkafka version (2.02):
  • Apache Kafka broker version: AWS MSK 2.8.1
  • Client configuration: {...}
  • Operating system: Lambda Function
  • Provide client logs (with 'debug': '..' as necessary)
  • Provide broker log excerpts
  • Critical issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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