bcwik9 / robinhood-on-rails

A web dashboard for the free trading platform Robinhood using Ruby on Rails and a private API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it just me?

jerrykil opened this issue · comments

I get this weird error, used to work fine. I don't get portfolio list at all, tried resetting the DB, pulled latest branch, etc. using mac os x with homebrew to run. Love the software!

Completed 500 Internal Server Error in 588ms (ActiveRecord: 16.7ms)

NoMethodError (undefined method `[]' for nil:NilClass):

app/controllers/robinhood_controller.rb:314:in block in watchlist' app/controllers/robinhood_controller.rb:313:in each'
app/controllers/robinhood_controller.rb:313:in `watchlist'

Are you sure you have the most up-to-date master branch? That error is strange because on master, line 314 in the robinhood controller is a blank empty line (https://github.com/bcwik9/robinhood-on-rails/blob/master/app/controllers/robinhood_controller.rb#L314).

It would help to know what line is actually causing the issue. I'm guessing it's having an issue retrieving your watchlist (seemingly you don't have any, but I'm guessing).

Master branch is working as expected for me.

I was using the crypto branch to see if it was fixed more recently. On the master branch the error reads


Completed 500 Internal Server Error in 541ms (ActiveRecord: 12.1ms)


  
NoMethodError (undefined method `[]' for nil:NilClass):
  
app/controllers/robinhood_controller.rb:304:in `block in watchlist'
app/controllers/robinhood_controller.rb:303:in `each'
app/controllers/robinhood_controller.rb:303:in `watchlist'

Hmm odd, I don't think I've encountered that error. You said the error is still present after clearing the database, so I'm guessing that means you tried rake db:drop db:create db:migrate?

I don't know exactly what i did to fix, but it involved updating dependent packages in pip or whatever.

Closing since issue is fixed