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

Cannot import last.fm scrobble history #359

Open
jtd5048 opened this issue May 13, 2024 · 5 comments
Open

Cannot import last.fm scrobble history #359

jtd5048 opened this issue May 13, 2024 · 5 comments

Comments

@jtd5048
Copy link

jtd5048 commented May 13, 2024

I started with a compose file that calls for the image stored in Dockerhub:

maloja:
        image: krateng/maloja
        container_name: maloja
        restart: unless-stopped
        environment:
            - MALOJA_DATA_DIRECTORY=/mljdata
            - PUID=1000
            - PGID=1000
        ports:
            - 42010:42010
        volumes:
            - ./maloja/data:/mljdata

and then stopped container and used the import instructions to get into the container shell: docker run -it --entrypoint sh -v $PWD/maloja/data:/mljdata -e MALOJA_DATA_DIRECTORY=/mljdata -e PUID=1000 -e PGID=1000 krateng/maloja
and attempted maloja import recenttrack-xyz.json, exported from ghan64 site. this returns: File could not be identified as a valid import source

I then noticed that the dockerhub image is 5 months old and the change for ghan's site looks like it's a week old

so I cloned the repo and built the image myself using docker build .

when I shell into this container, the command maloja import xyz.json is not recognized: sh: maloja: not found

so I am stuck on importing my listening history. Dockerhub seems to be too old and building the image locally also does not work correctly. I've exhausted my technical understanding at this point. What am I doing wrong? Help would be much appreciated

@Bujiraso
Copy link

Bujiraso commented May 14, 2024

I'm also facing this exact same scenario and I think we just need an updated docker image to help out.

a7dcf6d introduces a /venv encapsulation that's not currently taken account of in the resulting container. If you either source /venv/bin/activate or (theoretically) remove this line pair (at two separate locations)

-       python3 -m venv /venv && \
-    . /venv/bin/activate && \

Then you should be able to maloja again, the latter without the source work-around.

I was able to import tracks after this work-around.

@jtd5048
Copy link
Author

jtd5048 commented May 14, 2024

appreciate the digging. I used the first option (source /venv/bin/activate while in the shell for my built container) and was able to import all my listens

@jsspen
Copy link

jsspen commented Aug 24, 2024

Can we get an update on this? Docker Hub image is now 8 months old...

@bclouthier
Copy link

I've also been trying to import lastfm and spotify history. I have the container set-up using a compose.yml file and running. I would really like a way to import those files and then continue scrobbling to maloja.

@jtd5048
Copy link
Author

jtd5048 commented Nov 15, 2024

FYI I needed to move this image to another host and needed to recreate. This time, I attempted to use the other method of removing

-       python3 -m venv /venv && \
-    . /venv/bin/activate && \

from the Dockerfile and then docker build .. this failed on my NixOS host, complaining about the lack of virtual environment:

5.197 **** install pip dependencies ****
6.520 error: externally-managed-environment
6.520 
6.520 × This environment is externally managed
6.520 ╰─> 
6.520     The system-wide python installation should be maintained using the system
6.520     package manager (apk) only.
6.520     
6.520     If the package in question is not packaged already (and hence installable via
6.520     "apk add py3-somepackage"), please consider installing it inside a virtual
6.520     environment, e.g.:
6.520     
6.520     python3 -m venv /path/to/venv
6.520     . /path/to/venv/bin/activate
6.520     pip install mypackage
6.520     
6.520     To exit the virtual environment, run:
6.520     
6.520     deactivate
6.520     
6.520     The virtual environment is not deleted, and can be re-entered by re-sourcing
6.520     the activate file.
6.520     
6.520     To automatically manage virtual environments, consider using pipx (from the
6.520     pipx package).

I don't need to re-import, but figured I'd drop this here in case it helps anyone

(I really hope this project can be resurrected, forked, or if there is another self-hosted scrobbler please point me in that direction)

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

4 participants