mevimo / youbit

Host any type of file on YouTube
MIT License
673 stars 27 forks source link

TypeError When using encode #8

Closed Ramin-RX7 closed 2 years ago

Ramin-RX7 commented 2 years ago

When I try to encode my file with this code:

from youbit import Encoder
with Encoder('C:/myfile.txt') as encoder:
    path = encoder.encode('C:/mydirectory/')  # Saves output in 'C:/mydirectory'. Defaults to current working directory.
    print(path)

which is one of the examples mentioned, I get this error: TypeError: unsupported operand type(s) for /: 'str' and 'str'

Solution is in line 198 in "yb.py" You need to change output = directory / ("YOUBIT-" + self.metadata["filename"]) to: output = directory +"/"+ ("YOUBIT-" + self.metadata["filename"])

mevimo commented 2 years ago

Fixed in f1daab7. Note that this change is not yet on PyPi.