bcwik9 / robinhood-on-rails

A web dashboard for the free trading platform Robinhood using Ruby on Rails and a private API
MIT License
151 stars 53 forks source link

Is it just me? #38

Closed jerrykil closed 5 years ago

jerrykil commented 6 years ago

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:ineach' app/controllers/robinhood_controller.rb:313:in `watchlist'

bcwik9 commented 6 years ago

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.

jerrykil commented 6 years ago

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'
bcwik9 commented 6 years ago

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?

jerrykil commented 6 years ago

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

bcwik9 commented 5 years ago

Closing since issue is fixed