You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
devtools::load_all()
#Loading DataToMetabase
mc <- MetabaseClient()
mc$get_databases()
Working with Posit Cloud and the metabase.citizensforeurope.org instance, this yields the following error:
Error: invalid assignment for reference class field ‘session’, should be from class “character” or a subclass (was class “NULL”)
Looking at mc, the user and password were read successfully from .Renviron, however, session is indeed NULL.
Reference class object of class "MetabaseClient"
Field "user":
[1] "(anonymized)"
Field "password":
[1] "(anonymized)"
Field "metabase_url":
[1] "https://metabase.citizensforeurope.org/"
Field "session":
[1] ""
Field "api_uri_prefix":
[1] "/api"
Here, the documentation says "session: Object of class character Session token, which is obtained automatically."
The text was updated successfully, but these errors were encountered:
I'm not sure how sensitive the request library is with respect to double slashes, but the issue might be with metabase_url. The base url is actually "https://metabase.citizensforeurope.org", i.e. without the "/" at the end.
Nonetheless the error is still a little strange, because if the request fetching the session token fails, this should actually raise the corresponding request error. The error that you got suggests that the request somehow succeeded, but did not have the expected content, i.e. no session token. On the other hand it does happen regularly that websites do not return the request status that one would expect.
The trailing "/" seems to have been the cause of the issue. However, I'll leave the issue open for now as we might be able to make a better warning or similar to help users with this type of issue.
Working with Posit Cloud and the metabase.citizensforeurope.org instance, this yields the following error:
Error: invalid assignment for reference class field ‘session’, should be from class “character” or a subclass (was class “NULL”)
Looking at
mc
, theuser
andpassword
were read successfully from .Renviron, however,session
is indeed NULL.Here, the documentation says "session: Object of class character Session token, which is obtained automatically."
The text was updated successfully, but these errors were encountered: