Reputation: 7081
Can someone help me out, i am trying to upload a video to youtube using nodejs(MEANSTACK). I am using the youtube-uploader
module but this require me to install Python, i did but no luck.. this module has not been updated for a year.. can someone please help me with this out with a way to work around this or give me a module that work for this.. thanks in advance this is what have tired so far with the youtube-uploader
var youtubeUploader = require('youtube-uploader');
youtubeUploader.configure({
accessToken: ACCESS_TOKEN, // string
clientId: CLIENT_ID, // string
clientSecret: CLIENT_SECRET, // string
expiresIn: EXPIRES_IN, // string (default: '3600')
idToken: ID_TOKEN, // string
refreshToken: REFRESH_TOKEN, // string
tokenType: TOKEN_TYPE // string (default: 'Bearer')
}, function (err) {
if (err) { return console.error(err.message); }
youtubeUploader.upload({
path: VIDEO_PATH, // string
title: TITLE, // string
description: DESCRIPTION, // string
keywords: KEYWORDS, // array of string
category: CATEGORY_ID, // string (refer to https://developers.google.com/youtube/v3/docs/videoCategories/list)
privacy: PRIVACY // 'public', 'private', or 'unlisted'
}, function (err, videoId) {
// ...
});
});
And these are the errors am getting:
pythonPath = process.env.PYTHONPATH.split(':').concat(pythonModulesPath);
^
TypeError: Cannot read property 'split' of undefined
at Object.<anonymous> (/Users/andela/workspace/jsworkspace/sportbay/node_modules/youtube-uploader/index.js:13:40)
at Module._compile (module.js:460:26)
Upvotes: 2
Views: 128
Reputation: 3114
You should set the PYTHONPATH
environment variable in a terminal.
export PYTHONPATH=$(which python)
Upvotes: 1