vishnukraj / youtube-upload

Automatically exported from code.google.com/p/youtube-upload
0 stars 1 forks source link

OSError: [Errno 2] No such file or directory, but the File is there #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
= Versions

youtube-upload: 0.7.1
python: 2.7.3rc2
python-gdata: (it says "newest")

= Describe the steps (including the command you run) that will reproduce
the problem?

I am running your Uploader on my raspberry Pi, more to test something, but i 
have this issue now and you might can help me. If you need further logs i will 
give you them, but pls describe what exactly i have to do, my linux skills are 
worse...in the best case.

I wrotet a small script for an upload, to be executet in screen:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#!/bin/bash
mail="///mail///"
pass="///pass///"
tags="lets,play,dont,starve,sprung,lait,letz,ingame,gameplay,hunger,durst,tallbi
rd,spiders,danger,somewhere,survive,collect,attack,??leben,survival,no,manual,bl
ind,hd,full-hd,original,super,720P,1080P,burnoutdv,kangaroo,wilson,gentleman,sci
entist,demon,wilderness,beard,planlos,im,busch"
desc="Let's Sprung Dont Starve #010 - "
datei="Dont Starve 10.mkv"
url=$(youtube-upload --email="$mail" --password="$pass" --title="$datei" 
--description="$desc" --category="Games" --keywords="$tags" --private "$datei")
echo $url
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Than the console gives me this:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
kangaroo@raspberrypi ~/Upload $ sh dsupload.sh
', password='*******************'outdv@gmail.com
Start upload using a HTTP post: Dont Starve 10.mkv
Traceback (most recent call last):
  File "/usr/local/bin/youtube-upload", line 487, in <module>
    sys.exit(catch_exceptions(EXIT_CODES, main, sys.argv[1:]))
  File "/usr/local/bin/youtube-upload", line 111, in catch_exceptions
    fun(*args, **kwargs)
  File "/usr/local/bin/youtube-upload", line 484, in main
    run_main(options, args)
  File "/usr/local/bin/youtube-upload", line 421, in run_main
    url = upload_video(youtube, options, video_path, len(args), index)
  File "/usr/local/bin/youtube-upload", line 348, in upload_video
    post(data["post_url"], {"file": video_path}, {"token": data["token"]})
  File "/usr/local/bin/youtube-upload", line 149, in post
    total_filesize = sum(os.path.getsize(path) for path in files_params.values())
  File "/usr/local/bin/youtube-upload", line 149, in <genexpr>
    total_filesize = sum(os.path.getsize(path) for path in files_params.values())
  File "/usr/lib/python2.7/genericpath.py", line 49, in getsize
    return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: 'Dont Starve 10.mkv\r'

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I am not sure what exactly i made wrong, but i am quite sure its very easy and 
i only dont get it cause i am not really in touch with linux/python/everything 
else.

btw. the "dir" output:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
kangaroo@raspberrypi ~/Upload $ dir
Dont\ Starve\ 10.mkv  Dont\ Starve\ 11.mkv  Dont\ Starve\ 12.mkv  dsupload.sh
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Original issue reported on code.google.com by Burnou...@googlemail.com on 24 Jan 2013 at 9:24

GoogleCodeExporter commented 9 years ago
Check the filename: 'Dont Starve 10.mkv\r'. I don't know where this line feed 
comes from, but it seems to be the problem.

Original comment by tokland on 24 Jan 2013 at 9:50

GoogleCodeExporter commented 9 years ago

Original comment by tokland on 13 May 2014 at 2:55