Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep getting error in useMethod("tbl_vars") #99

Closed
bora19 opened this issue Jun 2, 2020 · 25 comments · Fixed by #109 or #143
Closed

Keep getting error in useMethod("tbl_vars") #99

bora19 opened this issue Jun 2, 2020 · 25 comments · Fixed by #109 or #143
Assignees
Labels
bug Something isn't working
Projects

Comments

@bora19
Copy link

bora19 commented Jun 2, 2020

When trying to connect via the following command

RH = RobinHood(username = "MyUsername", password = "MyPassword")

I keep getting the following error code

Error in UseMethod("tbl_vars") :
no applicable method for 'tbl_vars' applied to an object of class "NULL"

Im using the correct username and password. NOTE: my password includes special characters not sure if it matters or not

@bora19
Copy link
Author

bora19 commented Jun 3, 2020

Yeah changing the password to not include special characters worked but made my password less secure. We should not be changing password sounds like a bug

@JestonBlu
Copy link
Owner

This is a known issue that I'm working on. I keep getting issues created for this so I will pin this going forward until I get it resolved.

@JestonBlu
Copy link
Owner

#95

@JestonBlu JestonBlu self-assigned this Jun 6, 2020
@JestonBlu JestonBlu added the bug Something isn't working label Jun 6, 2020
@JestonBlu JestonBlu added this to To Do in 1.x via automation Jun 6, 2020
@JestonBlu JestonBlu pinned this issue Jun 6, 2020
@moosedoc011
Copy link

Attempted to simplify the password as outlined above -- still receiving the same error message. Is it possible this it related to 2FA?

@JestonBlu
Copy link
Owner

@moosedoc011 Maybe, i do not have any features related to 2FA, i will include that as a separate feature but i will prioritize it

@kfquach
Copy link

kfquach commented Oct 15, 2020

Just wanted to comment that I'm having this same issue as well.

@JestonBlu
Copy link
Owner

I have been working this, but i havent been able to find a solution as of yet. I have posted a stackoverflow looking for help on this one, but so far no takers. Anyone interested in proposing a solution would appreciated.

@JestonBlu
Copy link
Owner

After working through this issue on stackoverflow i have posted a fix below. I will add the commentary in the main README for future reference.

library(RobinHood)

# If the true password is: abc\def

# The following inputs will all work
rh <- RobinHood("username", pwd = r"(abc\def)")
rh <- RobinHood("username", pwd = "abc\\def")
rh <- RobinHood("username", pwd = "abc%5Cdef")

1.x automation moved this from To Do to Completed Nov 7, 2020
@e-arslan
Copy link

still getting this problem and there is no special character in the password.

R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Mojave 10.14.6

@JestonBlu
Copy link
Owner

are you inputting your email as your username?

@JestonBlu
Copy link
Owner

@e-arslan do you have 2-step authentication enabled on your account? I have not implemented that feature yet but agree its time. I will start looking into it.

@JestonBlu JestonBlu linked a pull request Jan 1, 2021 that will close this issue
@wittec
Copy link

wittec commented Jul 29, 2021

I'm getting this same problem. I have a special character in the password. I am using email address as username. I've tried the proposed fixes from November 7, but they aren't working for me. I have mfa disabled on account.

@JestonBlu
Copy link
Owner

@wittec what package version are you on?

@wittec
Copy link

wittec commented Jul 31, 2021 via email

@JestonBlu
Copy link
Owner

@wittec do you have multi-factor authentication enabled?

@wittec
Copy link

wittec commented Jul 31, 2021 via email

@JestonBlu
Copy link
Owner

I just tried it both with and without MFA and it worked fine for me. My password also contains special characters. Could you maybe try changing your password and using some different special characters to see if that works? I have continued to receive a few inquiries about this, but i havent been able to find anymore issues related to the code. I keep coming back to the password itself.

@wittec
Copy link

wittec commented Jul 31, 2021 via email

@wittec
Copy link

wittec commented Aug 14, 2021

I just tried it both with and without MFA and it worked fine for me. My password also contains special characters. Could you maybe try changing your password and using some different special characters to see if that works? I have continued to receive a few inquiries about this, but i havent been able to find anymore issues related to the code. I keep coming back to the password itself.

I changed my password and it is working now! Thank you!

@JestonBlu
Copy link
Owner

JestonBlu commented Aug 14, 2021 via email

@wittec
Copy link

wittec commented Aug 14, 2021

it was a "#" character. It was in the middle of the password.

@JestonBlu
Copy link
Owner

JestonBlu commented Aug 14, 2021 via email

@JanLauGe
Copy link
Contributor

JanLauGe commented Sep 21, 2021

Hi! First of all, thank you for making this package available. Great work!

I am running into issues with this as well. After ironing out details with password and MFA, my error is now slightly different to the ones described above but also a table_vars() error:

RH <- RobinHood(username="me@email.com", password="nospecialcharacters")
>  Error in UseMethod("tbl_vars") : 
>  no applicable method for 'tbl_vars' applied to an object of class "logical"

Digging in a bit further, it looks like authentication works fine but my response json does not contain margin balances

dta$margin_balances
[1] NA

Any ideas how to get around this?

UPDATE:
I was able to get around the issue by manually inserting some fake data for margin_balances. It seems that the issue may be that I don't have RobinHood gold. If that is a requirement for the package I think it would be good to mention it in the readme or the "Getting Started" vignette. If it isn't would you be open to a merge request to implement a flag or an automated detection of gold vs non gold accounts to fix this?

@SwingBotScripts
Copy link

@JanLauGe

I am having the same issues after months of successful access, and just posted on thread #124 .

Thinking about what changed for me this week...I downgraded my account from Instant Settlement to Cash in order to day trade with a smaller balance. I just read that you were having issues with margin balances being NA. This would make sense if margin trading is disabled, which is a feature of the Cash account. You say you had to supply "fake data" for the margin_balances to resolve the issue. Can you provide more insight on how you did this? I want to try the same.

Thanks!

@JestonBlu JestonBlu reopened this Dec 23, 2021
1.x automation moved this from Completed to To Do Dec 23, 2021
JestonBlu added a commit that referenced this issue Feb 20, 2022
1.x automation moved this from To Do to Completed Feb 20, 2022
@JanLauGe
Copy link
Contributor

JanLauGe commented Apr 5, 2022

Hey @SwingBotScripts! Coming back to this after some time.
I just put in a PR that fixes this for me. Root cause is a small if statement that seems buggy.
PR: #146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
1.x
  
Completed
8 participants