Skip to content

Newly installed version does not start due to missing "themes" package #1143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JPTIZ opened this issue Dec 14, 2021 · 5 comments
Closed

Newly installed version does not start due to missing "themes" package #1143

JPTIZ opened this issue Dec 14, 2021 · 5 comments
Labels
area: infrastructure Project infrastructure bug Something isn't working
Milestone

Comments

@JPTIZ
Copy link

JPTIZ commented Dec 14, 2021

There are a few problems actually.

  1. Apparently the last release (0.6.0) used platform.linux_distribution(), so installing it would fail due to platform not having linux_distribution() anymore. To reproduce:
$ pipx install zulip-term
$ zulip-term

(Pipx installs packages in an isolated virtualenv, similar to what is suggested on README.)

So creating a new release would be desirable.

  1. So, to avoid using 0.6.0 and use main/latest, I've tried to do:
$ pipx install git+https://github.com/zulip/zulip-terminal

But then running it leads to:

Traceback (most recent call last):
  File "/home/jptiz/.git-configs/files/bin/zulip-term", line 5, in <module>
    from zulipterminal.cli.run import main
  File "/home/jptiz/.local/pipx/venvs/zulip-term/lib/python3.10/site-packages/zulipterminal/cli/run.py", line 14, in <module>
    from zulipterminal.config.themes import (
  File "/home/jptiz/.local/pipx/venvs/zulip-term/lib/python3.10/site-packages/zulipterminal/config/themes.py", line 6, in <module>
    from zulipterminal.themes import gruvbox, zt_blue, zt_dark, zt_light
ModuleNotFoundError: No module named 'zulipterminal.themes'

And, indeed, checking the module directory it doesn't have the zulipterminal/themes directory at all, althought it does have the last commited change on zulipterminal.

I remember fixing this manually before, but can't remember how.

@JPTIZ
Copy link
Author

JPTIZ commented Dec 14, 2021

Ok, I remember how I fixed this: I cloned the repository separatedly, then copied the themes directory into the installed package's directory (<virtualenv>/zulipterminal).

@ElijahTheJew
Copy link
Contributor

Also (another method, mostly related to running from source), when in the source code directory run: source zt_venv/bin/activate
This activates the virtual environment. You can then run zulip-term without issue.

neiljp added a commit that referenced this issue Dec 15, 2021
This doesn't appear to be an issue for running locally from source or
similar, but causes an error with using `pipx`. This should resolve part
of #1143.
@neiljp
Copy link
Collaborator

neiljp commented Dec 15, 2021

@JPTIZ Addressing the themes issue, this seems to be related to a missing __init__.py for that directory. That doesn't seem to affect local usage/installs, but certainly does affect pipx - I can reproduce the issue you had.

I've just pushed a fix for that to main, so if you'd like to try a fresh install from main that would be useful to test - it appears to work fine for me, but secondary confirmation is always good, especially from the reporter of an issue :)

Regarding the issue with 0.6.0, I believe we don't directly rely on the code you mentioned, so this could be a limitation of the zulip package, which may have been pinned for you locally for some reason to a low version and not work for the version of python you have installed (3.10)?

neiljp added a commit that referenced this issue Dec 15, 2021
This doesn't appear to be an issue for running locally from source or
similar, but causes an error with using `pipx`. This should resolve part
of #1143.
neiljp added a commit that referenced this issue Dec 15, 2021
This doesn't appear to be an issue for running locally from source or
similar, but causes an error with using `pipx`. This should resolve part
of #1143.
@neiljp neiljp added area: infrastructure Project infrastructure bug Something isn't working labels Dec 15, 2021
@neiljp neiljp added this to the Next Release milestone Dec 15, 2021
@JPTIZ
Copy link
Author

JPTIZ commented Dec 21, 2021

@JPTIZ Addressing the themes issue, this seems to be related to a missing __init__.py for that directory. That doesn't seem to affect local usage/installs, but certainly does affect pipx - I can reproduce the issue you had.

I've just pushed a fix for that to main, so if you'd like to try a fresh install from main that would be useful to test - it appears to work fine for me, but secondary confirmation is always good, especially from the reporter of an issue :)

And indeed it works :)

Regarding the issue with 0.6.0, I believe we don't directly rely on the code you mentioned, so this could be a limitation of the zulip package, which may have been pinned for you locally for some reason to a low version and not work for the version of python you have installed (3.10)?

Right, I see it is a zulip-api version issue. I'll open a new issue just to address each problem on its place and let this one closed (solved).


Solved by 793e73d

@neiljp
Copy link
Collaborator

neiljp commented Dec 29, 2021

@JPTIZ Thanks for confirming 👍

mounilKshah pushed a commit to mounilKshah/zulip-terminal that referenced this issue Jan 2, 2022
This doesn't appear to be an issue for running locally from source or
similar, but causes an error with using `pipx`. This should resolve part
of zulip#1143.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infrastructure Project infrastructure bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants