Skip to content

Commit

Permalink
fix " No module named 'har2locust\\default"
Browse files Browse the repository at this point in the history
  • Loading branch information
goodve committed Mar 4, 2023
1 parent 469fd14 commit d1ec467
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion har2locust/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def load_plugins(plugins: list[str] = [], disable_plugins: list[str] = []):

sys.path.append(os.path.curdir) # accept plugins by relative path
for plugin in default_and_extra_plugins:
import_path = plugin.replace("/", ".").rstrip(".py")
# in windows OS print(plugin) echo har2locust\default_plugins\1_resourcefilter.py
import_path = plugin.replace("/", ".").replace("\\", ".").rstrip(".py")
importlib.import_module(import_path)
logging.debug("imported " + import_path)
logging.debug(f"loaded plugins {default_and_extra_plugins}")
Expand Down

0 comments on commit d1ec467

Please sign in to comment.