{"action":"closed","issue":{"url":"https://api.github.com/repos/bstascavage/plexReport/issues/32","labels_url":"https://api.github.com/repos/bstascavage/plexReport/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/bstascavage/plexReport/issues/32/comments","events_url":"https://api.github.com/repos/bstascavage/plexReport/issues/32/events","html_url":"https://github.com/bstascavage/plexReport/issues/32","id":53176754,"number":32,"title":"Error sort_by","user":{"login":"ToloRiera","id":5164145,"avatar_url":"https://avatars.githubusercontent.com/u/5164145?v=3","gravatar_id":"","url":"https://api.github.com/users/ToloRiera","html_url":"https://github.com/ToloRiera","followers_url":"https://api.github.com/users/ToloRiera/followers","following_url":"https://api.github.com/users/ToloRiera/following{/other_user}","gists_url":"https://api.github.com/users/ToloRiera/gists{/gist_id}","starred_url":"https://api.github.com/users/ToloRiera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ToloRiera/subscriptions","organizations_url":"https://api.github.com/users/ToloRiera/orgs","repos_url":"https://api.github.com/users/ToloRiera/repos","events_url":"https://api.github.com/users/ToloRiera/events{/privacy}","received_events_url":"https://api.github.com/users/ToloRiera/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2014-12-31T10:07:53Z","updated_at":"2015-02-02T18:45:41Z","closed_at":"2015-02-02T18:45:41Z","body":"Hello, I love this script!\r\nI had a permissions issue (\"Log file not found Exiting ....\") I've solved temporarily.\r\nApplying changing permissions \"chmod -R 775\" to plexReport directory permissions. What Should I apply?\r\nWith this problem fixed, another new problem appears when I run the script:\r\n\r\n```\r\n/home/tolo/plexReport/bin/plexReport.rb:189:in `sort_by': comparison of NilClass with String failed (ArgumentError)\r\n\tfrom /home/tolo/plexReport/bin/plexReport.rb:189:in `sort_by!'\r\n\tfrom /home/tolo/plexReport/bin/plexReport.rb:189:in `getTVEpisodes'\r\n\tfrom /home/tolo/plexReport/bin/plexReport.rb:317:in `main'\r\n\tfrom /home/tolo/plexReport/bin/plexReport.rb:335:in `<main>'\r\n```\r\nI searched the line of code fails and That is: (in case you help)\r\n\r\n```\r\n# Method for getting new TV shows from the Plx server  \r\n    def getTVEpisodes\r\n        plex = Plex.new($config)\r\n        tv_episodes = Hash.new\r\n        tv_episodes[:new] = []\r\n        tv_episodes[:seasons] = []\r\n \r\n        library = plex.get('/library/sections')\r\n        library['MediaContainer']['Directory'].each do | element |\r\n            if element['type'] == 'show'\r\n                library = plex.get(\"/library/sections/#{element['key']}/all\")\r\n                library['MediaContainer']['Directory'].each do | element |\r\n                    tv_episodes = self.getTVInfo(element, tv_episodes)\r\n                end\r\n            end\r\n        end\r\n \r\n        tv_episodes[:new].sort_by! { |hsh| hsh[:series_name] }\r\n        tv_episodes[:seasons].sort_by! { |hsh| hsh[:series_name] }\r\n        return tv_episodes\r\n    end\r\n```\r\nmy config.yaml file with personal data blanked:\r\n\r\n```\r\nemail:\r\n        title: 'Novedades de la semana'\r\nplex:\r\n        server: localhost\r\n        api_key: ******\r\nmail:\r\n        address: smtp.****.com\r\n        port: 25\r\n        username: alert@****.com\r\n        password: ****\r\n        from: MoviesServer\r\n        subject: 'Novedades de la semana - '\r\n        recipients_email: ['****@me.com']\r\n        recipients: ['****', '****']\r\n```\r\nSorry for my English"}}