'Sandboxie.ini-Error when opening a sandbox with py-sandboxie
I have Sandboxie-Classic installed, but i also tried with Sandboxie-Plus.
This is my Python code (From the "Docs"):
import sandboxie
sbie = sandboxie.Sandboxie()
sbie.create_sandbox(box='foo', options={'Enabled': 'yes'})
sbie.start('notepad.exe', box='foo', wait=False)
The error i get:
Traceback (most recent call last):
File "C:\Users\\Desktop\Coding\Atom\Tests\testing1.py", line 127, in <module>
sbie.create_sandbox(box='foo', options={'Enabled': 'yes'})
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\sandboxie.py", line 120, in create_sandbox
with self._modify_config() as config:
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in __enter__
return next(self.gen)
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\sandboxie.py", line 105, in _modify_config
config = self.get_config()
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\sandboxie.py", line 114, in get_config
config.read_file(config_file)
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\configparser.py", line 719, in read_file
self._read(f, source)
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\configparser.py", line 1086, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.
file: 'C:\\Windows\\Sandboxie.ini', line: 1
'\ufeff#\n'
Versions: Python 3.10, Sandboxie-Py 0.2.0, Sandboxie-App 5.55.11 References: Github, Pypi
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
