devshawn / kafka-shell

⚡A supercharged, interactive Kafka shell built on top of the existing Kafka CLI tools.
Apache License 2.0
126 stars 11 forks source link

cannot launch kafka-shell #16

Closed PGDataHome closed 4 years ago

PGDataHome commented 4 years ago

Describe the bug A clear and concise description of what the bug is.

here's my output hadoop@pascal-asus:~/kafka$ kafka-shell Invalid user configuration (root): None is not of type 'object' hadoop@pascal-asus:~/kafka$

To Reproduce Steps to reproduce the behavior:

  1. Run kafka-shell
  2. ...

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

devshawn commented 4 years ago

Hi @PGDataHome, can you share your contents of the config.yaml file?

cat ~/.kafka-shell/config.yaml

If you haven't modified the config, you should be able to delete it and re-launch kafka-shell and it will generate a new one.

PGDataHome commented 4 years ago

cat ~/.kafka-shell/config.yaml -- file is empty

Le sam. 23 nov. 2019 à 18:43, Shawn Seymour notifications@github.com a écrit :

Hi @PGDataHome https://github.com/PGDataHome, can you share your contents of the config.yaml file?

cat ~/.kafka-shell/config.yaml

If you haven't modified the config, you should be able to delete it and re-launch kafka-shell and it will generate a new one.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/devshawn/kafka-shell/issues/16?email_source=notifications&email_token=AMBZFRD2GLLIZ6RGBJZHDKTQVFTTPA5CNFSM4JOEFKKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE72CJQ#issuecomment-557818150, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMBZFRF6WDOQ6KIGJKUBYILQVFTTPANCNFSM4JOEFKKA .

PGDataHome commented 4 years ago

here's complete transcript, included my trial, and trace error


hadoop@pascal-asus:~/kafka$ cat ~/.kafka-shell/config.yaml hadoop@pascal-asus:~/kafka$ rm ~/.kafka-shell/config.yaml hadoop@pascal-asus:~/kafka$ cd kafka-shell bash: cd: kafka-shell: No such file or directory hadoop@pascal-asus:~/kafka$ which kafka-shell /usr/local/bin/kafka-shell hadoop@pascal-asus:~/kafka$ kafka-shell Traceback (most recent call last): File "/usr/local/bin/kafka-shell", line 11, in load_entry_point('kafka-shell==0.1.2', 'console_scripts', 'kafka-shell')() File "/usr/local/lib/python3.7/dist-packages/kafka_shell-0.1.2-py3.7.egg/kafkashell/main.py", line 32, in main settings = Settings() File "/usr/local/lib/python3.7/dist-packages/kafka_shell-0.1.2-py3.7.egg/kafkashell/settings.py", line 27, in init config.init_config() File "/usr/local/lib/python3.7/dist-packages/kafka_shell-0.1.2-py3.7.egg/kafkashell/config.py", line 45, in init_config save_yaml(default_config, f) File "/usr/local/lib/python3.7/dist-packages/kafka_shell-0.1.2-py3.7.egg/kafkashell/config.py", line 97, in save_yaml yaml.dump(config, f, default_flow_style=False, sort_keys=False) File "/usr/lib/python3/dist-packages/yaml/init.py", line 200, in dump return dump_all([data], stream, Dumper=Dumper, **kwds) TypeError: dump_all() got an unexpected keyword argument 'sort_keys' hadoop@pascal-asus:~/kafka$

Le dim. 24 nov. 2019 à 10:26, Pascal GUICHARD pascal.guichard@gmail.com a écrit :

cat ~/.kafka-shell/config.yaml -- file is empty

Le sam. 23 nov. 2019 à 18:43, Shawn Seymour notifications@github.com a écrit :

Hi @PGDataHome https://github.com/PGDataHome, can you share your contents of the config.yaml file?

cat ~/.kafka-shell/config.yaml

If you haven't modified the config, you should be able to delete it and re-launch kafka-shell and it will generate a new one.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/devshawn/kafka-shell/issues/16?email_source=notifications&email_token=AMBZFRD2GLLIZ6RGBJZHDKTQVFTTPA5CNFSM4JOEFKKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE72CJQ#issuecomment-557818150, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMBZFRF6WDOQ6KIGJKUBYILQVFTTPANCNFSM4JOEFKKA .

devshawn commented 4 years ago

Hi @PGDataHome, thanks for the very helpful stacktrace. I believe this is happening due to an outdated pyyaml version on your machine. That package is not currently pinned to a newer version in kafka-shell as I'm using a wrapper library that includes it. I'll update the repo to pin the module, but you should be able to fix this by running:

rm ~/.kafka-shell/config.yaml && pip3 install 'pyyaml==5.1'

Then, you can run kafka-shell. I hope that helps!

PGDataHome commented 4 years ago

ok, I can launch kafka-shell rhx

Le dim. 24 nov. 2019 à 16:30, Shawn Seymour notifications@github.com a écrit :

Hi @PGDataHome https://github.com/PGDataHome, thanks for the very helpful stacktrace. I believe this is happening due to an outdated pyyaml version on your machine. That package is not currently pinned to a newer version in kafka-shell as I'm using a wrapper library that includes it. I'll update the repo to pin the module, but you should be able to fix this by running:

rm ~/.kafka-shell/config.yaml && pip3 install 'pyyaml==5.1'

Then, you can run kafka-shell. I hope that helps!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/devshawn/kafka-shell/issues/16?email_source=notifications&email_token=AMBZFRHUZZIK7W6R4FBYCDTQVKMX5A5CNFSM4JOEFKKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAN4UQ#issuecomment-557899346, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMBZFRCPV5DEUXXRTH55V5LQVKMX5ANCNFSM4JOEFKKA .

devshawn commented 4 years ago

Happy to hear!