vladmandic / sd-extension-system-info

System and platform info and standardized benchmarking extension for SD.Next and WebUI
https://vladmandic.github.io/sd-extension-system-info/pages/benchmark.html
MIT License
280 stars 51 forks source link

Error: __file_ not defined #12

Closed nixudos closed 1 year ago

nixudos commented 1 year ago

I get following ewrror when trying to use the extension (Windows 10)

Error loading script: system-info.py Traceback (most recent call last): File "C:\SD-Automatic1111\stable-diffusion-webui\modules\scripts.py", line 229, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "C:\SD-Automatic1111\stable-diffusion-webui\modules\script_loading.py", line 13, in load_module exec(compiled, module.dict) File "C:\SD-Automatic1111\stable-diffusion-webui\extensions\sd-extension-system-info\scripts\system-info.py", line 29, in bench_file = os.path.join(os.path.dirname(file), 'benchmark-data-local.json') NameError: name 'file' is not defined

vladmandic commented 1 year ago

what is the extension verion? try to update it? correct code is

bench_file = os.path.join(os.path.dirname(file), 'benchmark-data-local.json')

and __file__ is always defined in python.

vladmandic commented 1 year ago

no information provided, closing.