Giter Club home page Giter Club logo

Comments (7)

wkaisertexas avatar wkaisertexas commented on May 26, 2024

Did you pass a valid video path to the program?

The program first says:

print("Uploading", path)

Given path is a keyword argument, it defaults to None. Check and make sure that you really passed a video path either upload_video or upload_videos

from tiktok-uploader.

hthappy avatar hthappy commented on May 26, 2024

Did you pass a valid video path to the program?

The program first says:

print("Uploading", path)

Given path is a keyword argument, it defaults to None. Check and make sure that you really passed a video path either upload_video or upload_videos

Hi there,

I tried to modify the absolute address of the video, but I still got an error after running the script. The browser showed that the account was not logged in successfully. Below is the returned log:

[hetao@localhost douyin]$ python3 example.py
[WDM] - Downloading: 100%|███████████████████████████████████████████████████████████████████████████████| 6.75M/6.75M [00:01<00:00, 4.27MB/s]
Uploading None
expected str, bytes or os.PathLike object, not NoneType
Uploading None
expected str, bytes or os.PathLike object, not NoneType
/home/hetao/Desktop/work/python/douyin/1.mp4 with description "1.mp4 test" failed
/home/hetao/Desktop/work/python/douyin/2.mp4 with description "2.mp4 test" failed

from tiktok-uploader.

hthappy avatar hthappy commented on May 26, 2024

This is the source code

from tiktok_uploader.upload import upload_videos
from tiktok_uploader.auth import AuthBackend


videos = [
    {
        'video': '/home/hetao/Desktop/work/python/douyin/1.mp4',
        'description': '1.mp4 test'
    },
    {
        'video': '/home/hetao/Desktop/work/python/douyin/2.mp4',
        'description': '2.mp4 test'
    }
]

auth = AuthBackend(cookies='cookies.txt')
failed_videos = upload_videos(videos=videos, auth=auth)

for video in failed_videos: # each input video object which failed
    print(f'{video["video"]} with description "{video["description"]}" failed')

from tiktok-uploader.

wkaisertexas avatar wkaisertexas commented on May 26, 2024

Oh, this is def me being a little dumb,

{
        'path': 'video2.mp4', 
        'description': 'this is also my description'
    }

The keyword specified was supposed to be 'path'

I really need to fix the parser for this so that the namespace is more flexible. Thanks for bringing this to my attention.

from tiktok-uploader.

hthappy avatar hthappy commented on May 26, 2024

哦,这肯定是我有点笨,

{
        'path': 'video2.mp4', 
        'description': 'this is also my description'
    }

指定的关键字应该是“路径”

我真的需要为此修复解析器,以便命名空间更加灵活。感谢您提请我注意此事。

感谢指出,我太笨了,开始没有注意到,现在我把关键词video修改成path,已经成功上传视频。感谢感谢

from tiktok-uploader.

wkaisertexas avatar wkaisertexas commented on May 26, 2024

没有有用的错误消息对我来说有点不好意思

from tiktok-uploader.

wkaisertexas avatar wkaisertexas commented on May 26, 2024

Hey, in the new release, there is a loose checker which fixes the error or misspelling the keys.

Also, this error is raised before the rest of the program is run.

Thank you for bringing this to my attention.

from tiktok-uploader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.