Skip to content
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

When trying to play from history it throws an error #164

Closed
GreatTeacherOni opened this issue May 19, 2024 · 8 comments
Closed

When trying to play from history it throws an error #164

GreatTeacherOni opened this issue May 19, 2024 · 8 comments

Comments

@GreatTeacherOni
Copy link

GreatTeacherOni commented May 19, 2024

Describe the bug
When running anipy-cli -H in anipy-cli v3 and choosing an episode from history it throws an error.

To Reproduce
Steps to reproduce the behavior:

  1. Run anipy-cli -H
  2. Choose any anime from history
  3. See following error:
  File "/path/to/bin/anipy-cli", line 8, in <module>
    sys.exit(run_cli())
             ^^^^^^^^^
  File "/path/to/lib/python3.11/site-packages/anipy_cli/cli.py", line 60, in run_cli
    cli_class(options=args).run()
  File "/path/to/lib/python3.11/site-packages/anipy_cli/clis/base_cli.py", line 29, in run
    self.take_input()
  File "/path/to/lib/python3.11/site-packages/anipy_cli/clis/history_cli.py", line 55, in take_input
    self.anime = Anime.from_local_list_entry(entry)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/lib/python3.11/site-packages/anipy_api/anime.py", line 58, in from_local_list_entry
    provider = next(filter(lambda x: x.NAME == entry.provider, list_providers()))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

Expected behavior
Stream should start in configured player

Info
Post your output of pip show anipy-cli:
Name: anipy-cli
Version: 3.0.4
Summary: Watch and Download anime from the comfort of your Terminal
Home-page: https://sdaqo.github.io/anipy-cli
Author: sdaqo
Author-email: sdaqo.dev@protonmail.com
License: GPL-3.0
Location: /home/user/.cache/pypoetry/virtualenvs/anipycli-iWLBxt5Y-py3.11/lib/python3.11/site-packages
Requires: anipy-api, appdirs, inquirerpy, pypresence, pyyaml, yaspin
Required-by:

Platform

  • OS: NixOS 24.05
  • Default player: mpv (0.37.0)
  • Python 3.11.8
  • Running anipy-cli in pypoetry virtualenv due to issue under Additional context

Additional context
Since anipy-cli v3 I have to run it from pypoetry on NixOS (inside a nix-shell) and set env variable "LD_LIBRARY_PATH" inside that shell.
Pre-v3 doesn't have this issue and I am able to start it directly in any python virtualenv without having to set "LD_LIBRARY_PATH" manually.
If I try to start anipy-cli v3 from python virtualenv it throws following error:

Traceback (most recent call last):
  File "/home/user/.venv/py311-anipy-cli/bin/anipy-cli", line 5, in <module>
    from anipy_cli.cli import run_cli
  File "/home/user/.venv/py311-anipy-cli/lib/python3.11/site-packages/anipy_cli/cli.py", line 6, in <module>
    from anipy_cli.clis import *
  File "/home/user/.venv/py311-anipy-cli/lib/python3.11/site-packages/anipy_cli/clis/__init__.py", line 1, in <module>
    from anipy_cli.clis.default_cli import DefaultCli
  File "/home/user/.venv/py311-anipy-cli/lib/python3.11/site-packages/anipy_cli/clis/default_cli.py", line 9, in <module>
    from anipy_cli.menus import Menu
  File "/home/user/.venv/py311-anipy-cli/lib/python3.11/site-packages/anipy_cli/menus/__init__.py", line 2, in <module>
    from anipy_cli.menus.mal_menu import MALMenu
  File "/home/user/.venv/py311-anipy-cli/lib/python3.11/site-packages/anipy_cli/menus/mal_menu.py", line 7, in <module>
    from anipy_api.mal import MALAnime, MALMyListStatusEnum, MyAnimeList
  File "/home/user/.venv/py311-anipy-cli/lib/python3.11/site-packages/anipy_api/mal.py", line 6, in <module>
    import Levenshtein
  File "/home/user/.venv/py311-anipy-cli/lib/python3.11/site-packages/Levenshtein/__init__.py", line 35, in <module>
    from Levenshtein.levenshtein_cpp import (
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory
@sdaqo
Copy link
Owner

sdaqo commented May 19, 2024

Ok, please send me your history file (located in the user files path, check the config), and also your config (without mal credentials if used)

@sdaqo
Copy link
Owner

sdaqo commented May 19, 2024

About the other error, well it seems like one dependency I am using uses some native c/c++ code. To be honest I have never really used nix, but I will look into it eventually, maybe even publish a nixpkg 🤔?

@sdaqo
Copy link
Owner

sdaqo commented May 19, 2024

btw I found the error.... the code for migrating history has typo in gogoanime that makes loading the history file fail. If you want to repair your history file replace all 'gogoanmie' with 'gogoanime' else just delete it.

@sdaqo sdaqo closed this as completed May 19, 2024
@GreatTeacherOni
Copy link
Author

maybe even publish a nixpkg 🤔?

That would be awesome!

@GreatTeacherOni
Copy link
Author

GreatTeacherOni commented May 19, 2024

btw I found the error.... the code for migrating history has typo in gogoanime that makes loading the history file fail. If you want to repair your history file replace all 'gogoanmie' with 'gogoanime' else just delete it.

I replaced it and now it works flawlessly. Thank you!

@GreatTeacherOni
Copy link
Author

GreatTeacherOni commented May 19, 2024

Ok, please send me your history file (located in the user files path, check the config), and also your config (without mal credentials if used)

Btw in the new config.yaml there is no information to the history_file_path anymore. So if you don't know that the history file is located in user_files_path then there is no info where to look. In the old config.yaml the history file path was configurable. Would be nice if you could implement that again :)

@sdaqo
Copy link
Owner

sdaqo commented May 19, 2024

Ok, please send me your history file (located in the user files path, check the config), and also your config (without mal credentials if used)

Btw in the new config.yaml there is no information to the history_file_path anymore. So if you don't know that the history file is located in user_files_path then it there is no info where to look. In the old config.yaml the history file path was configurable.

That is by design, in the old one it also was not configurable the history path is and was always user _files/history.json. Now I just do not show it anymore to avoid confusion, I do however have a little note in the moment above the user files path that explains that.

@GreatTeacherOni
Copy link
Author

Ok, please send me your history file (located in the user files path, check the config), and also your config (without mal credentials if used)

Btw in the new config.yaml there is no information to the history_file_path anymore. So if you don't know that the history file is located in user_files_path then it there is no info where to look. In the old config.yaml the history file path was configurable.

That is by design, in the old one it also was not configurable the history path is and was always user _files/history.json. Now I just do not show it anymore to avoid confusion, I do however have a little note in the moment above the user files path that explains that.

You're right! I must have read over that part ^^
Awesome project btw! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants