tgcf
tgcf copied to clipboard
ERROR stat: path should be string, bytes, os.PathLike or integer, not NoneType in marking
In mark pluging stat: path should be string, bytes, os.PathLike or integer, not NoneType this error is coming
You should update to the latest version of the script. You have 2 errors there. The first is probably caused by forbidden characters in file names. 21:22:59 should be replaced by 21-22-59 or by 21.22.59. By the way, what are you trying to do?
The second error is caused by an incorrect path in your config file. You have to replace path/watermark.jpg with the actual path of the file on your device. For example, D:\photos\image1.jpg or you can upload that image to Imgur and use the address like this https://imgur.com/yiH6ini
Check https://github.com/aahnik/tgcf/wiki/How-to-use--watermarking-%3F
Hi @tissole - Can u give an example of path for image without using https (imgur or others) where tgcf is hosted on cloud platform where we do not have any folder access.
Hi, I have the same problem
I am using the latest version of this program
In herouk, with the same command and entering the address, I could make a watermark replacement, but I can't in the window.
I found the source of this error, It occurs only on Windows and is because the script stamps the names of the files with forbidden characters, like :
The solution is to add :
to the list of characters to be replaced if occurs in file names. To do that the file utils.py from the tgcf folder has to be modified.
The line 58 looks like this return re.sub(pattern=r"[-!@#$%^&*()\s]", repl="_", string=string)
These are the forbidden characters that when occur in file names are replaced by the _
character. Be sure to add :
to the list after the \s
. It should look like this after modification
return re.sub(pattern=r"[-!@#$%^&*()\s:]", repl="_", string=string)
After this modification, the error does not occur anymore and the photos are watermarked correctly.
@mujahidazamcsm If you deploy on the cloud you have to use the link of the photo, you cannot use the local path. The link should be put in your config file, see wiki
hi
im fix this problem
but There is another problem
tgcf is download my watermark but cant replace
@mahdish45 Make sure you have FFmpeg installed on Windows and added to the path. Check this guide