m.amanullah7: look at the other files in the `listenbrainz/db` directory. we are not using orm in most cases.
2025-06-25 17608, 2025
lucifer[m]
plain sql queries.
2025-06-25 17644, 2025
mamanullah7[m]
lucifer:Sure let me check i'll try not to use then!
2025-06-25 17644, 2025
lucifer[m]
holycow23: let's rename time_bracket to hour and also the data type from string to integer.
2025-06-25 17654, 2025
holycow23[m]
cool
2025-06-25 17656, 2025
holycow23[m]
will do that
2025-06-25 17610, 2025
holycow23[m]
what's the next step though?
2025-06-25 17614, 2025
lucifer[m]
then update the api to read from couchdb.
2025-06-25 17624, 2025
lucifer[m]
and the frontend to render the chart using the api data.
2025-06-25 17641, 2025
holycow23[m]
Just the last step of StatsDB to Webserver is left right over [here](https://listenbrainz.readthedocs.io/en/latest/developers/spark-architecture.html)
2025-06-25 17651, 2025
lucifer[m]
that is the api serving the stats after reading it from couchdb.
2025-06-25 17608, 2025
holycow23[m]
Yeah but that's the only step left right mainly?
2025-06-25 17626, 2025
lucifer[m]
yes
2025-06-25 17648, 2025
holycow23[m]
Also I was trying to import listenbrainz.db.stats as db_stats in the terminal but gives an import error of psycopg2 and while installing it gives an error
2025-06-25 17610, 2025
lucifer[m]
try pip install psycopg2-binary
2025-06-25 17611, 2025
holycow23[m]
which I feel needs certain sudo installs should I go ahead with them?
2025-06-25 17649, 2025
holycow23[m]
Did that but still the same import issue
2025-06-25 17636, 2025
lucifer[m]
i checked and its an issue with the pip installation on wolf. this worked, python3.12 -m pip install psycopg2-binary --break-system-packages.
2025-06-25 17624, 2025
holycow23[m]
psycopg2-binary installed without any error for me
2025-06-25 17655, 2025
holycow23[m]
but the import of import listenbrainz.db.stats as db_stats still gives an error
2025-06-25 17650, 2025
lucifer[m]
what's the error?
2025-06-25 17604, 2025
holycow23[m]
ModuleNotFoundError: No module named 'psycopg2'
2025-06-25 17633, 2025
lucifer[m]
okay, there's an issue with the python installed on wolf. but anyway. you should create a virtual environment and use python in that.
2025-06-25 17652, 2025
lucifer[m]
python3.12 -m venv venv
2025-06-25 17601, 2025
lucifer[m]
.venv/bin/activate
2025-06-25 17612, 2025
lucifer[m]
pip install -r requirements.txt
2025-06-25 17618, 2025
lucifer[m]
should work fine then
2025-06-25 17627, 2025
lucifer[m]
* . venv/bin/activate
2025-06-25 17636, 2025
pite has quit
2025-06-25 17626, 2025
holycow23[m]
inside the environment do I start the shell using the same docker exec -it listenbrainzspark-request_consumer-1 pyspark --driver-memory 16g?
2025-06-25 17642, 2025
lucifer[m]
if you use docker then the environment won't be used
2025-06-25 17652, 2025
lucifer[m]
it only matters if you are running commands outside docker
2025-06-25 17653, 2025
pite joined the channel
2025-06-25 17604, 2025
holycow23[m]
yes that's what I assumed
2025-06-25 17628, 2025
holycow23[m]
Also the pip install gave an error
2025-06-25 17656, 2025
holycow23[m]
uWSGI gave an error
2025-06-25 17610, 2025
lucifer[m]
what's the error?
2025-06-25 17631, 2025
holycow23[m]
ERROR: Could not build wheels for uWSGI, which is required to install pyproject.toml-based projects
holycow23: can you please update your wolf setup to expose ports only on 127.0.0.1 ?
2025-06-25 17610, 2025
lucifer[m]
that should be the default in docker compose files iirc.
2025-06-25 17625, 2025
holycow23[m]
- "127.0.0.1:9000:9000"
2025-06-25 17625, 2025
holycow23[m]
- "127.0.0.1:9870:9870"
2025-06-25 17630, 2025
holycow23[m]
this is what I have
2025-06-25 17649, 2025
lucifer[m]
in the other docker-compose.yml
2025-06-25 17655, 2025
lucifer[m]
for listenbrainz web/websockets etc.
2025-06-25 17644, 2025
holycow23[m]
Everything is on 127.0.0.1
2025-06-25 17653, 2025
lucifer[m]
hmm
2025-06-25 17613, 2025
lucifer[m]
holycow23: i see the docker file was missing the default host for some containers, and the default is 0.0.0.0 so the issue. i have updated the docker compose file on your setup. just stop and start the containers when ready
2025-06-25 17638, 2025
holycow23[m]
okay
2025-06-25 17640, 2025
jasje[m] has quit
2025-06-25 17613, 2025
mamanullah7[m]
lucifer:
2025-06-25 17613, 2025
mamanullah7[m]
```
2025-06-25 17613, 2025
mamanullah7[m]
```
2025-06-25 17640, 2025
mamanullah7[m]
lucifer:... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/JBvoAYtdFbnTeGxgkfSCgsqf>)
2025-06-25 17625, 2025
lucifer[m]
m.amanullah7: create a unique index on user_id and funkwhale_server_id.
2025-06-25 17641, 2025
mamanullah7[m]
okay!
2025-06-25 17654, 2025
mamanullah7[m]
lucifer: Thanks it woking now!
2025-06-25 17629, 2025
mamanullah7[m]
lucifer: last time i tried to upload one song on fw but it failed to upload! is there any way to add songs? i wants to test fw in brainzplayer! should i push changes can u look into?
2025-06-25 17645, 2025
lucifer[m]
m.amanullah7: try again now and if it doesn't work, share the error you see.
2025-06-25 17658, 2025
HemangMishra[m] has quit
2025-06-25 17629, 2025
mamanullah7[m]
i'm not able to upload songs on fw ?
2025-06-25 17640, 2025
mamanullah7[m]
* lucifer: i'm not
2025-06-25 17604, 2025
lucifer[m]
how are you trying to upload the songs?
2025-06-25 17630, 2025
mamanullah7[m]
lucifer: ive downloaded locally one song and in settings there is an option to upload songs, i'm uploading there
2025-06-25 17644, 2025
lucifer[m]
mayhem: is the wolf nginx + le setup running from your account?
2025-06-25 17616, 2025
lucifer[m]
want to increase the upload size limit on it.
2025-06-25 17640, 2025
lucifer[m]
m.amanullah7: its failing because currently the max upload size allowed is likely 1 MB? if you have a small audio file or maybe crop an existing one. that could work until i can update the size on wolf.
2025-06-25 17616, 2025
mamanullah7[m]
lucifer: let me try!
2025-06-25 17659, 2025
zas[m] has quit
2025-06-25 17614, 2025
mamanullah7[m]
lucifer: i tried to upload the audio less than 1MB it showing its uploaded but i cant able to find that songs anywhere?
2025-06-25 17626, 2025
lucifer[m]
i can't see it on my end if you uploaded it with privacy set to you. can you try uploading it again with privacy set to instance?
2025-06-25 17609, 2025
lucifer[m] uploaded an image: (14KiB) < https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/eabwRwrDunfCpJijQnqgjxEB/image.png >
2025-06-25 17619, 2025
lucifer[m]
this setting on the top left of the upload modal
2025-06-25 17646, 2025
mamanullah7[m]
lucifer: uplaoded one song can u able to see
2025-06-25 17626, 2025
lucifer[m]
nope.
2025-06-25 17652, 2025
lucifer[m]
i'll try to upload something and debug this when the upload is fixed.
2025-06-25 17604, 2025
lucifer[m]
* the upload issue is fixed.
2025-06-25 17620, 2025
q3lont has quit
2025-06-25 17658, 2025
q3lont joined the channel
2025-06-25 17633, 2025
mamanullah7[m]
sure!
2025-06-25 17653, 2025
lusciouslover has quit
2025-06-25 17612, 2025
lusciouslover joined the channel
2025-06-25 17649, 2025
RandomMushroom12 has quit
2025-06-25 17650, 2025
holycow23[m]
lucifer: I just pulled down the docker and re ran the stats so for some reason the genre stats have gone away and giving this error when generating any other type of stat
2025-06-25 17650, 2025
holycow23[m]
```request_consumer-1 | listenbrainz_spark.exceptions.PathNotFoundException: Path not found: /release_metadata_cache
2025-06-25 17650, 2025
holycow23[m]
request_consumer-1 | [PATH_NOT_FOUND] Path does not exist: hdfs://namenode:9000/release_metadata_cache.```
2025-06-25 17607, 2025
holycow23[m]
* lucifer: I just pulled down the docker and re ran the stats so for some reason the genre stats have gone away and giving this error when generating any other type of stat... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/cmfRIcBIGkLlUXMmhfiMaxun>)
2025-06-25 17631, 2025
mayhem[m]
<lucifer[m]> "mayhem: is the wolf nginx + le..." <- look in /home/production
2025-06-25 17629, 2025
recqd[m] joined the channel
2025-06-25 17629, 2025
recqd[m]
is there anyway to submit edits like changing a country, and voting yes/no or abstain on edits via the API?