GithubHelp home page GithubHelp logo

Comments (11)

shatterhand19 avatar shatterhand19 commented on September 25, 2024

Hi, sorry for seeing the issue just now. I have changed the Readme to reflect this - you have to specify global path.
Check if you get the same thing if you run it with the global path.

from rhythmboxpopm.

Teque5 avatar Teque5 commented on September 25, 2024

Yeah it finds a lot of files, but I get the same error:

$ java POPMToRB ~/../../srv/media/Music/**/*.mp3
[/home/me/../../srv/media/Music/album1/validfiles.mp3, /home/me/../../srv/media/Music/album2/validfiles.mp3]
Exception in thread "main" java.nio.charset.MalformedInputException: Input length = 1
	at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
	at java.io.InputStreamReader.read(InputStreamReader.java:184)
	at java.io.BufferedReader.fill(BufferedReader.java:161)
	at java.io.BufferedReader.readLine(BufferedReader.java:324)
	at java.io.BufferedReader.readLine(BufferedReader.java:389)
	at java.nio.file.Files.readAllLines(Files.java:3205)
	at java.nio.file.Files.readAllLines(Files.java:3242)
	at POPMToRB.main(POPMToRB.java:41)

from rhythmboxpopm.

shatterhand19 avatar shatterhand19 commented on September 25, 2024

Are the files mounted on a network drive? Apart from that I have no idea why this would happen, I used it a few weeks back on my new computer and it worked perfectly. If it is still happening if you run it for a file in ~/Music/file.mp3, then I will look into it after a few days, now I am snowed under with work.

from rhythmboxpopm.

Teque5 avatar Teque5 commented on September 25, 2024

Yeah even local files get the same error.
openjdk version "1.8.0_162"

  master  ~  Source  RhythmboxPOPM  1  java POPMToRB ~/Source/R
hythmboxPOPM/test.mp3 
[/home/teque5/Source/RhythmboxPOPM/test.mp3]
Exception in thread "main" java.nio.charset.MalformedInputException: Input length = 1
	at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
	at java.io.InputStreamReader.read(InputStreamReader.java:184)
	at java.io.BufferedReader.fill(BufferedReader.java:161)
	at java.io.BufferedReader.readLine(BufferedReader.java:324)
	at java.io.BufferedReader.readLine(BufferedReader.java:389)
	at java.nio.file.Files.readAllLines(Files.java:3205)
	at java.nio.file.Files.readAllLines(Files.java:3242)
	at POPMToRB.main(POPMToRB.java:41)

from rhythmboxpopm.

shatterhand19 avatar shatterhand19 commented on September 25, 2024

Ok, thank you for the info, will look into it in a couple of days. Apparently the problem is with the charsets, but without expecting the code I can't say more.
Meanwhile what OS are you on and what Java version is installed on it?

from rhythmboxpopm.

shatterhand19 avatar shatterhand19 commented on September 25, 2024

Could you also try this and post the output:
sudo apt install enca; enca -L none ~/Documents/.rbtopopm_temp.txt

from rhythmboxpopm.

Teque5 avatar Teque5 commented on September 25, 2024
$ enca -L none ~/Documents/.rbtopopm_temp.txt
7bit ASCII characters

Ubuntu 16.04 & openjdk version "1.8.0_162"

from rhythmboxpopm.

shatterhand19 avatar shatterhand19 commented on September 25, 2024

Ok, so I believe the problem is the encoding. I will push a new version that is converting this file to UTF-8 and then check again. Also, just in case, update to the latest version of openjdk, I don't know if you current is the latest.

from rhythmboxpopm.

shatterhand19 avatar shatterhand19 commented on September 25, 2024

Strangely enough mine I just tested mine with a file that was 7bit ASCII and it worked. This is really peculiar. Have you tried pulling and reinstalling? Otherwise it does not make sense, the only difference is probably the JDK version (I have 9) and the OS (I am on 17.10).
Could you run and let me know if the problem persists so I can look into it.

sudo apt install openjdk-9-jdk

from rhythmboxpopm.

Teque5 avatar Teque5 commented on September 25, 2024

FYI I'm running all this locally; I'm not interested in the install portion.

When i update to openjdk9 i just get a longer error message

Exception in thread "main" java.nio.charset.MalformedInputException: Input length = 1
	at java.nio.charset.CoderResult.throwException(java.base@9-internal/CoderResult.java:281)
	at sun.nio.cs.StreamDecoder.implRead(java.base@9-internal/StreamDecoder.java:339)
	at sun.nio.cs.StreamDecoder.read(java.base@9-internal/StreamDecoder.java:178)
	at java.io.InputStreamReader.read(java.base@9-internal/InputStreamReader.java:185)
	at java.io.BufferedReader.fill(java.base@9-internal/BufferedReader.java:161)
	at java.io.BufferedReader.readLine(java.base@9-internal/BufferedReader.java:325)
	at java.io.BufferedReader.readLine(java.base@9-internal/BufferedReader.java:390)
	at java.nio.file.Files.readAllLines(java.base@9-internal/Files.java:3222)
	at java.nio.file.Files.readAllLines(java.base@9-internal/Files.java:3259)
	at POPMToRB.main(POPMToRB.java:42)

At this point I think I may just write a python script to do this when i get some free time.

from rhythmboxpopm.

Teque5 avatar Teque5 commented on September 25, 2024

For anyone else looking for a solution, i posted the python implementation gist here.

Currently works on mp3 & flac.

from rhythmboxpopm.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.