Error importing video after disk enlargement

I already asked a question here, but no one answers- (

I have a disk mounted in the folder /var/www/peertube/storage/ it was Originally 100GB in size. I decided to increase the disk size to 300GB. After that, the ability to import videos from youtube disappeared and the torrent download stopped working. Errors are returned. But downloading local videos works fine. Rights to the folder /var/www/peertube/storage/ peertube:peertube 775. I showed you more details in the video. Why did this happen and how can I fix it?

Here is the result of the log file at the time of import


{« message »:« - - [01/Apr/2020:08:33:20 +0000] « GET /tracker/socket HTTP/1.1 » 200 3624 « - » « Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0 »\n »,« level »:« info »,« label »:« »,« timestamp »:« 2020-04-01T08:33:20.342Z »}
{« level »:« info »,« message »:« Cannot fetch information from import for URL",« label »:« »,« err »:{« stack »:"Error: Command failed with exit code 1: /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl -i --dump-json -f best -j --flat-playlist\n at makeError (/var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/node_modules/execa/lib/error.js:56:11)\n at handlePromise (/var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/node_modules/execa/index.js:114:26)\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task_queues.js:97:5) »,« message »:« Command failed with exit code 1: /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl -i --dump-json -f best -j --flat-playlist",« command »:"/var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl -i --dump-json -f best -j --flat-playlist",« exitCode »:1,« stdout »:"","stderr »:" File « /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl », line 2\nSyntaxError: Non-ASCII character ‹ \x97 › in file /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl on line 3, but no encoding declared; see for details",« failed »:true,« timedOut »:false,« isCanceled »:false,« killed »:false},« timestamp »:« 2020-04-01T08:33:34.471Z »}


Did you check if your vdb1 partition was not mounted readonly ?

Local videos load correctly, so peertube user has write permissions-)
Here is the entry in the fstab file
/dev/vdb1 /var/www/peertube/storage/ ext4 defaults 1 2
The parameter ‹ defaults › mounts in modes - exec, auto, rw, nouser, async, nosuid, atime


I see this in your trace: SyntaxError: Non-ASCII character ‹ \x97 › in file /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl on line 3, but no encoding declared; see for details",« failed »:true,« timedOut »:false,« isCanceled »:false,« killed »:false},« timestamp »:« 2020-04-01T08:33:34.471Z »}

That seems to be a problem of character encoding.

Look at the line 3 of the file /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl

All content is displayed in the wrong encoding, is it the way it should be?


PK^C^D^T^@^@^@^H^@ ^H!(�}��3^Q^@^@^B?^@^@^Q^@^^@youtube_dl/aes.pyUT ^@^C\�l8\�l8ux^K^@^A^D�^C^@^@^D�^C^@^@՛ks^[Ǖ���W�ڕ%$
^D/^N^[)�r̆Y^R�M�’��S�3Z^^^O����6�����?^N���^]<D������Z��zkR���+g��^YW;^Q�y�j^]�G��lmh4�������\h^]^H�" ^[�űݲ��ɋE�x9^RF���-$
f���^S7ӻx��8ut�^N�C�Pm�%��YVaQj�ݲT�4�(猃�KS�<0e=]-C��*-Ma�a��&�[L^En�wQ�^Wf�y��ȫWA��j���b��w�"��^G�?F=��m|���sٸ^Z^W?h�3� $

After all, I did not do anything with the server files.

I do not know about peertube. I just try to logically find what could be wrong.

As reading the error message. I supposed that the youtube-dl module is the source of the error. Indeed, following the content of the youtube-dl file you sent us, shows that this is a python zip package. It might be dynamically « extracted » by the peertube system. This youtube-dl will then be deployed as a python module structure (folders and files) and the main youtube-dl file (in pseudo sub-folder bin) shall call thanks to an import youtube_dl (see The error message tells that there is an non-ascii char in the line 3 of this bin/youtube-dl. According to the source git of youtube-dl, this line is the import youtube_dl

The ascii table does only have 128 char codes (0x00 to 0x7F in hex). So the char number 0x97 is not know in such table. Reason of the error message.

However, the extended ascii could handle such code number. But its not true to say that 0x97 is a specific char in extended ASCII since there could be plethore of different code pages.

But looking at the wikipedia page about extended ascii, there is a picture of the e-ascii table you may found in Cygwin ( The element 0x97 in this table seems curiously to an underscore char ( _ ).

Coincidence that line 3 of bin/youtube-dl has an underscore ? Maybe yes, maybe not.

That’s why I focus on this point.

You may try this:

  1. Move your youtube-dl in a backup directory within your home
  2. Download the last youtube-dl sudo curl -L -o /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl
  3. Changing rights chmod a+rx /usr/local/bin/youtube-dl
    4 Maybe changing owner to peertube

(Take care about the path I gave you, i might have made mistakes. I give you the way I would try :wink:)

if executed through the full path, as [Findus23]
then the result is

peertube@peervideo:~$ /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl
  File "/var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl", line 2
SyntaxError: Non-ASCII character '\x97' in file /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl on line 3, but no encoding declared; see for details

It is very strange that this worked before expanding the disk. I don’t see any connection yet. In any case, the problem is relevant. I ask for your help!

So, you have the file /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin/youtube-dl

And this is the file you have shown its (weird) content ?

Could you check if this file a text python script file ? Can you send us the content if this is the case ?

If its content is like

#!/usr/bin/env python

import youtube_dl

if __name__ == '__main__':

Then try to insert
# -*- coding: utf-8 -*-
straight under

(for info, why i suggest this:

What do I need to do for this? I can send you the whole module directory /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl
Download folder youtube-dl


I did only notice this yesterday before going to bed.

SyntaxError: Non-ASCII character

The error

File "youtube-dl", line 2
SyntaxError: Non-ASCII character '\x93' ...

means you’re using an outdated version of Python. Please update to Python 2.6 or 2.7.

So check your Python version :slight_smile:

The system is installed version 2.7

peertube@peervideo:~$ python --version
Python 2.7.16
peertube@peervideo:~$ python3 --version
Python 3.7.3


« Something is rotten in your state » :slight_smile:

I do not forget you only extend your logical volume. But as I see no reason too that it will put conflicts in the software logic, I want to exclude other possibilities.

Now I’m trying to install another instance and check on it youtube-dl directly

The problem is resolved.
I downloaded the ** youtube-dl ** file here
and replaced it in the /var/www/peertube/versions/peertube-v2.1.1/node_modules/youtube-dl/bin folder
And everything began to work fine. Why the failure occurred precisely after expanding the storage disk I do not know. Many thanks to all for your advice and your help.

Now there is a problem with torrent files.

This torrent file is not supported or too large. Please, make sure it is of the following type: .torrent

How can this problem be solved?

Glad to know you solve you youtube-dl problem. Could you set you mark your last answer as the solution ?

Please write another thread for the torrent issue. Thus, it will be more visible for other people that might encountered the same issue.

There could be many reasons as to why the error message, « Error Compiling Movie. Unknown Error. » gets displayed that it can be difficult to know where to start. Since not all suggestions below would apply to your specific issue, you could skip any step that does not pertain to your particular setup MyPrepaidCenter