Skip to content

Commit

Permalink
Merge pull request #359 from roboflow/fix/download_dataset_does_not_r…
Browse files Browse the repository at this point in the history
…espect_roboflow_api_key

fix `download_dataset` does not respect `ROBOFLOW_API_KEY`
  • Loading branch information
SkalskiP authored Feb 12, 2025
2 parents 5b46359 + 2e21d02 commit 3130988
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions roboflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,12 @@ def initialize_roboflow(the_workspace=None):

global active_workspace

conf_location = os.getenv("ROBOFLOW_CONFIG_DIR", default=str(Path.home() / ".config" / "roboflow" / "config.json"))

if not os.path.isfile(conf_location):
raise RuntimeError("To use this method, you must first login - run roboflow.login()")
if the_workspace is None:
active_workspace = Roboflow().workspace()
else:
if the_workspace is None:
active_workspace = Roboflow().workspace()
else:
active_workspace = Roboflow().workspace(the_workspace)
active_workspace = Roboflow().workspace(the_workspace)

return active_workspace
return active_workspace


def load_model(model_url):
Expand Down

0 comments on commit 3130988

Please sign in to comment.