Open garlontas opened 3 years ago
Is there a way you can describe to reproduce the problem?
So first I had this code:
try:
results = acoustid.match(self.__API_KEY, self.__file)
except acoustid.NoBackendError:
raise error.ChromaprintNotFoundException(
"Chromaprint library/tool not found")
except acoustid.FingerprintGenerationError:
raise error.FingerprintGenerationError(
"Fingerprint could not be calculated")
except acoustid.WebServiceError as exc:
raise error.WebServiceError("Web service request failed:", exc.message)
try:
result = next(results)
except StopIteration as exc:
raise error.FingerprintGenerationError(
"Fingerprint could not be calculated") from exc
self.__id = result[1]
return self.__id
When I run that code, your pyacoustid calculates the fingerprint with the default calculator, and it fails with the StopIteration error because the generator is empty.
Afterwards I changed the code and wrote this:
try:
results = acoustid.match(self.__API_KEY, self.__file, force_fpcalc=True)
except acoustid.NoBackendError:
raise error.ChromaprintNotFoundException(
"Chromaprint library/tool not found")
except acoustid.FingerprintGenerationError:
raise error.FingerprintGenerationError(
"Fingerprint could not be calculated")
except acoustid.WebServiceError as exc:
raise error.WebServiceError("Web service request failed:", exc.message)
try:
result = next(results)
except StopIteration as exc:
raise error.FingerprintGenerationError(
"Fingerprint could not be calculated") from exc
self.__id = result[1]
return self.__id
Now everything worked, and I got no errors (fpcalc version 1.4.3)
The file I tested with has the fpcalc result: result.txt
I can confirm this issue, I have the exact same problem.
OS: elementaryOS 6 (Ubuntu 20.04) chromaprint: 1.4.3 (distribution provided)
Hello! I'm developing an application using your library and I had the problem that I didn't get any result with the default fingerprinting. (
acoustid.match(self.__API_KEY, self.__file)
) :disappointed: Then I usedacoustid.match(self.__API_KEY, self.__file, force_fpcalc=True)
and I received the data I needed. :+1: Maybe you could take a look at this problem. A possible solution would be setting fpcalc as the default finger printer.PS: It also occurs using your aidmatch.py script