alexanderepstein / Bash-Snippets

A collection of small bash scripts for heavy terminal users

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cant run movies

darsh12 opened this issue · comments

Issue Label:

  • Bug
  • New feature
  • Enhancement
  • New component

Description:
Trying to run "movies Inception" but ending up getting a blank screen

bash -x movies Inception does have output

+ currentVersion=1.22.0
+ configuredClient=
+ configuredPython=
+ detail=false
++ uname
+ [[ Darwin != \D\a\r\w\i\n ]]
++ uname
+ [[ Darwin != \D\a\r\w\i\n ]]
+ getConfiguredClient
+ command -v curl
+ configuredClient=curl
+ getopts ud:hv flag
+ [[ 1 == 0 ]]
+ [[ Inception == \u\p\d\a\t\e ]]
+ [[ Inception == \h\e\l\p ]]
+ checkInternet
+ httpGet github.com
+ getMovieInfo Inception
+ apiKey=946f500a
++ sed s/-d+//g
++ echo Inception
++ tr ' ' +
+ movie=Inception
+ export PYTHONIOENCODING=utf8
+ PYTHONIOENCODING=utf8
++ httpGet 'http://www.omdbapi.com/?t=Inception&apikey=946f500a'
++ case "$configuredClient" in
++ curl -A curl -s 'http://www.omdbapi.com/?t=Inception&apikey=946f500a'
+ movieInfo='{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16 Jul 2010","Runtime":"148 min","Genre":"Action, Adventure, Sci-Fi","Director":"Christopher Nolan","Writer":"Christopher Nolan","Actors":"Leonardo DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom Hardy","Plot":"A thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a CEO.","Language":"English, Japanese, French","Country":"USA, UK","Awards":"Won 4 Oscars. Another 152 wins & 203 nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet Movie Database","Value":"8.8/10"},{"Source":"Rotten Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07 Dec 2010","BoxOffice":"$292,568,851","Production":"Warner Bros. Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' Bros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
++ python -c 'import sys, json; print json.load(sys.stdin)['\''Response'\'']'
+ checkResponse=
+ [[ '' == \F\a\l\s\e ]]
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' B++ python -c 'import sys, json; print json.load(sys.stdin)['\''Title'\'']'
ros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
+ title=
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' Bros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
++ python -c 'import sys, json; print json.load(sys.stdin)['\''Year'\'']'
+ year=
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' Bros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
++ python -c 'import sys, json; print json.load(sys.stdin)['\''Runtime'\'']'
+ runtime=
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' B++ python -c 'import sys, json; print json.load(sys.stdin)['\''Ratings'\''][0]['\''Value'\'']'
ros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
+ imdbScore=
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' B++ python -c 'import sys, json; print json.load(sys.stdin)['\''Ratings'\''][1]['\''Value'\'']'
ros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
+ tomatoScore=
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' Bros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
++ python -c 'import sys, json; print json.load(sys.stdin)['\''Ratings'\''][2]['\''Value'\'']'
+ metacriticScore=
++ python -c 'import sys, json; print json.load(sys.stdin)['\''Rated'\'']'
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' Bros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
+ rated=
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' Bros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
++ python -c 'import sys, json; print json.load(sys.stdin)['\''Genre'\'']'
+ genre=
++ python -c 'import sys, json; print json.load(sys.stdin)['\''Director'\'']'
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' Bros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
+ director=
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' Bros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
++ python -c 'import sys, json; print json.load(sys.stdin)['\''Production'\'']'
+ production=
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' Bros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
++ python -c 'import sys, json; print json.load(sys.stdin)['\''BoxOffice'\'']'
+ boxOffice=
++ python -c 'import sys, json; print json.load(sys.stdin)['\''Actors'\'']'
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' Bros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
+ actors=
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' Bros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
++ python -c 'import sys, json; print json.load(sys.stdin)['\''Plot'\'']'
+ plot=
++ echo '{"Title":"Inception","Year":"2010","Rated":"PG-13","Released":"16' Jul '2010","Runtime":"148' 'min","Genre":"Action,' Adventure, 'Sci-Fi","Director":"Christopher' 'Nolan","Writer":"Christopher' 'Nolan","Actors":"Leonardo' DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom 'Hardy","Plot":"A' thief, who steals corporate secrets through the use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a 'CEO.","Language":"English,' Japanese, 'French","Country":"USA,' 'UK","Awards":"Won' 4 Oscars. Another 152 wins '&' 203 'nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet' Movie 'Database","Value":"8.8/10"},{"Source":"Rotten' 'Tomatoes","Value":"86%"},{"Source":"Metacritic","Value":"74/100"}],"Metascore":"74","imdbRating":"8.8","imdbVotes":"1,683,454","imdbID":"tt1375666","Type":"movie","DVD":"07' Dec '2010","BoxOffice":"$292,568,851","Production":"Warner' Bros. 'Pictures","Website":"http://inceptionmovie.warnerbros.com/","Response":"True"}'
++ python -c 'import sys, json; print json.load(sys.stdin)['\''Awards'\'']'
+ awards=
+ exit 1

If its a bug make sure to include this section.

OS and OS version:

  • Mac
  • Linux 32 Bit
  • Linux 64 Bit
  • Windows 32 Bit
  • Windows 64 Bit

OS Version:
10.13.13

What version of bash-snippets are you using? It appears you are missing the | after each echo of the response from the api, if you notice none of the variables are actually being set, which is odd. I am running the identical command on my machine and it works without any problems. I am using Linux, but this doesn't seem to be the issue although it could be

Can you take this code and place it in a file called test.sh and run bash -x test.sh

#!/usr/bin/env bash

movieinfo=$(curl -A curl -s 'http://www.omdbapi.com/?t=Inception&apikey=946f500a')
year=$(echo $movieinfo | python -c 'import sys, json; print json.load(sys.stdin)['\''Year'\'']')

I would have uploaded the file for you but github wont allow me to upload a shell script. Post the output here. It is basically just trying the same thing but only for one of the fields.

Additionally can you run python -V and let me know what that says?

I am assuming that you might have installed python3 through something like homebrew which might be breaking the scripts call to python. I am not sure if i can fix that for you exactly. The only fix i can offer if that is the case would be to create an alias to python2 in your ~/.bashrc (it might be called .bash_profile on mac) by adding this line to the file

alias python="python2"

Python 2

screen shot 2018-04-03 at 9 17 41 pm

Python 3

screen shot 2018-04-03 at 9 19 21 pm

Sorry I haven't responded, been a little busy, it might have to do with your version of python I will look into it and get back to you

no problem...not a big deal

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

commented

This issue has been automatically closed because it has been inactive for 30 days.

I know this was closed but I noticed that this still happens with other movies.

Sometimes there is a pause in the command and then nothing happens, but if I run the same command it works.

Just felt that I had to leave in case

Sorry this was closed by a bot cause I have been busy and haven't touched it, so does this work sometimes for you then? That seems a little weird

Yeah it is. I don't get it anymore so maybe there was something up with my terminal when I ran the command.