Skip to content

Commit 3130988

Browse files
authored
Merge pull request #359 from roboflow/fix/download_dataset_does_not_respect_roboflow_api_key
fix `download_dataset` does not respect `ROBOFLOW_API_KEY`
2 parents 5b46359 + 2e21d02 commit 3130988

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

roboflow/__init__.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,12 @@ def initialize_roboflow(the_workspace=None):
131131

132132
global active_workspace
133133

134-
conf_location = os.getenv("ROBOFLOW_CONFIG_DIR", default=str(Path.home() / ".config" / "roboflow" / "config.json"))
135-
136-
if not os.path.isfile(conf_location):
137-
raise RuntimeError("To use this method, you must first login - run roboflow.login()")
134+
if the_workspace is None:
135+
active_workspace = Roboflow().workspace()
138136
else:
139-
if the_workspace is None:
140-
active_workspace = Roboflow().workspace()
141-
else:
142-
active_workspace = Roboflow().workspace(the_workspace)
137+
active_workspace = Roboflow().workspace(the_workspace)
143138

144-
return active_workspace
139+
return active_workspace
145140

146141

147142
def load_model(model_url):

0 commit comments

Comments
 (0)