I want to change mp3tag by python

Question: I can’t run this code(below)(python)

Current behavior: Consol doesn’t work.

Desired behavior: Run this code normally

Repl link: https://replit.com/@yeubxidnjsbdjnajfhdj/mp3tag
This repl is my friend’s.

This program will change mp3tag.

This is the code>>

from mutagen.easyid3 import EasyID3
path = input("Enter the path of the song:")
tags = EasyID3(path)
tags['title'] = input("Enter the title:")
tags['artist'] = input("Enter the artist:")
tags['album'] = input("Enter the album:")
#tags['title'] = 'new_title'
print("change completed!")

Welcome to the forums, @BellRin!
Do you get an error while running the code?

1 Like

Can you chack my python code?
Running this code, it shows an error(below).

※Can you see the photo?↑

I can’t understand what this error means.

Hi @BellRin ! This means that the package is not installed in your repl. To install it, try entering poetry add mutagen in the Shell.
Hope this helps!

1 Like

Thank you for your reply!
But I had an error in Shell.(below)
Do you have another idea to solve this problem?

※Can you see the photo? ↑

Sorry. I sent a wrong photo.
Error in this time is below.

Can you see the photo? ↑

Hi @BellRin !
Could you enter poetry remove mutagen then enter poetry add mutagen then kill 1 in the Shell? Then, in the .replit file, enter the following line below entrypoint:

disableGuessImports = true

Hope this helps!

1 Like

Thank you for your reply!
I did it now. But I don’t understand “kill 1 in the shell”.
Also, as I found “.replit.” , I don’t know where to write it.
Please tell me more.

This is all I did.↑

Thank you so much!!!
I could run the repl!!
I could edit mp3tag.
Thank you for all the help and advice you have given me so far!

1 Like

Hi @BellRin !
The command kill 1 just refreshes the environment, I used it so that the program updates the changes if necessary.

Please mark this post as the solution if it solved your problem so people with the same issue can easily find the solution.

cc: @QwertyQwerty88 @dragonhunter1 @MattDESTROYER @Firepup650

1 Like

The disableGuessImports = true line actually prevents Replit from installing modules automatically, which can become problematic in some cases. It’s not 100% necessary, but it’s good to have it.
You should write the line below the line that says entrypoint = "main.py".

Thank you so much!
I will learn python more and more!!
I may ask you again about python!!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.