Skip to content

Commit 6c48f31

Browse files
committed
fix: 🐛 check for rlogin is None
Signed-off-by: Onuralp SEZER <[email protected]>
1 parent 78c15e9 commit 6c48f31

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

roboflow/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ def login(workspace=None, force=False):
114114

115115
if r_login.status_code == 200:
116116
r_login = r_login.json()
117+
if r_login is None:
118+
raise ValueError("Invalid API key. "
119+
"Please check your API key and try again.")
117120

118121
# make config directory if it doesn't exist
119122
if not os.path.exists(os.path.dirname(conf_location)):

0 commit comments

Comments
 (0)