cancel
Showing results for 
Search instead for 
Did you mean: 
chenhai
Mission Specialist
Mission Specialist
  • 304 Views

ad482.common cannot be found

hi im keep getting error when I run the python script, for example, looks like the module ad482.common cannot be found

(.venv) chenhai@huchenhais-MacBook-Pro AD482 % python ad482/streams-interaction/scripts/produce_integer_payments.py payments
/Users/chenhai/AD482/.venv/lib/python3.9/site-packages/labs/common/labtools.py:15: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
Traceback (most recent call last):
File "/Users/chenhai/AD482/ad482/streams-interaction/scripts/produce_integer_payments.py", line 22, in <module>
kafka.produce_many(
File "/Users/chenhai/AD482/.venv/lib/python3.9/site-packages/ad482/common/kafka/__init__.py", line 53, in produce_many
producer = KafkaPublisher.from_config(
File "/Users/chenhai/AD482/.venv/lib/python3.9/site-packages/ad482/common/kafka/client.py", line 86, in from_config
return cls(
File "/Users/chenhai/AD482/.venv/lib/python3.9/site-packages/ad482/common/kafka/client.py", line 101, in __init__
self._producer = kafkalib.KafkaProducer(
File "/Users/chenhai/AD482/.venv/lib/python3.9/site-packages/kafka/producer/kafka.py", line 383, in __init__
client = self.config['kafka_client'](
File "/Users/chenhai/AD482/.venv/lib/python3.9/site-packages/kafka/client_async.py", line 211, in __init__
self.cluster = ClusterMetadata(**self.config)
File "/Users/chenhai/AD482/.venv/lib/python3.9/site-packages/kafka/cluster.py", line 67, in __init__
self._bootstrap_brokers = self._generate_bootstrap_brokers()
File "/Users/chenhai/AD482/.venv/lib/python3.9/site-packages/kafka/cluster.py", line 72, in _generate_bootstrap_brokers
bootstrap_hosts = collect_hosts(self.config['bootstrap_servers'])
File "/Users/chenhai/AD482/.venv/lib/python3.9/site-packages/kafka/conn.py", line 1512, in collect_hosts
host, port, afi = get_ip_port_afi(host_port)
File "/Users/chenhai/AD482/.venv/lib/python3.9/site-packages/kafka/conn.py", line 1493, in get_ip_port_afi
port = int(port)
ValueError: invalid literal for int() with base 10: 'None'

Tags (4)
2 Replies
TudorRaduta
Community Manager
Community Manager
  • 299 Views

@chenhai I’m sure the community will jump in, but since you may be on a time-sensitive schedule, the best option is to open a support ticket directly from the platform.

Tags (4)
Chetan_Tiwary_
Community Manager
Community Manager
  • 157 Views

@chenhai For this problem, did you install the python scripts ?

because that ad482.common is part of what we distribute with dynolabs in that course.

0 Kudos
Join the discussion
You must log in to join this conversation.