auto-m4b icon indicating copy to clipboard operation
auto-m4b copied to clipboard

Error during conversion

Open joggs opened this issue 1 year ago • 2 comments

Error during conversion. The root folder and all content has been chmodded and chown'ed, so that is not the problem. All the chapter files are still located in temp folder, but no merged file exists after the conversion.

Error:

. . . Moving folders with 2 or more audiofiles to /temp/merge/ renamed '/temp/recentlyadded/Walter_Isaacson_-Steve_Jobs_en_biografi' -> '/temp/merge/Walter_Isaacson_-Steve_Jobs_en_biografi' Moving single file mp3's to /temp/merge/ Moving all the single m4b books to /temp/untagged/ Walter_Isaacson_-Steve_Jobs_en_biografi/ Folder Detected Sampling Walter_Isaacson_-Steve_Jobs_en_biografi/Walter_Isaacson_-Steve_Jobs_en_biografi-tmpfiles - 005-005-walter_isaacson-steve_jobs_en_biografiwalter_isaacson-steve_jobs_en_biografi-finished.m4b Bitrate = 129132 The folder Walter_Isaacson_-Steve_Jobs_en_biografi will be merged to /temp/untagged/Walter_Isaacson_-Steve_Jobs_en_biografi/Walter_Isaacson_-Steve_Jobs_en_biografi.m4b Starting Conversion Oct 11 18:09:01 42514ca96983 CRON[2389]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi) an error occured, that has not been caught: Array ( [type] => 8192 [message] => Return type of M4bTool\Audio\Tag::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [file] => phar:///usr/local/bin/m4b-tool/src/library/M4bTool/Audio/Tag.php [line] => 158 ) Finished Converting

joggs avatar Oct 11 '24 16:10 joggs

In PHP 8.1 and later, stricter type checking has been introduced, and the ArrayAccess interface requires that the offsetUnset() method has a return type of void. A possible resolution could be to modify the Tag.php file in one of two ways:

Option 1: Add the Correct Return Type by updating the offsetUnset() method in the Tag.php file to return void, kinda like this public function offsetUnset($offset): void {

Option 2: temporary supress it:

#[\ReturnTypeWillChange]
public function offsetUnset($offset) {

joggs avatar Oct 11 '24 16:10 joggs

I believe that the Tag.php file actually gets downloaded and installed when the seanap/auto-m4b image is built. Those files come from https://github.com/sandreas/m4b-tool based on my understanding and this has already been resolved in the code. Just looks like this image just needs to be rebuilt to resolve this issue.

tboucher204 avatar Feb 06 '25 17:02 tboucher204