BTT Octopus unable to get the inductive Probe running

Hey
I try to get my “PL-08N2 NPN NC” probe running on the Btt Octopus 1.1.

V+ and Ground are wired direcly to the PS.
Signal is conectet to the signal pin PB7 (Sensor Port) Jumper set to 24V.

I run my printer in this config for months with marlin.
Now i tried to switch to klipper and always get the same error:

File contains parsing errors: /home/pi/printer.cfg
[line 574]: ’ pin: ~PB7\n

I already tried : ~PB7; ~!PB7; PB7; !PB7; ^PB7; ^!PB7; ~^PB7; ~^!PB7
without any result.

Her´s my log:
Restarting printer
Start printer at Tue Apr 5 20:24:47 2022 (1649186687.6 2811.6)
Config error
Traceback (most recent call last):
File “/home/pi/klipper/klippy/klippy.py”, line 157, in _connect
self._read_config()
File “/home/pi/klipper/klippy/klippy.py”, line 134, in _read_config
config = pconfig.read_main_config()
File “/home/pi/klipper/klippy/configfile.py”, line 276, in read_main_config
regular_config = self._build_config_wrapper(regular_data, filename)
File “/home/pi/klipper/klippy/configfile.py”, line 263, in _build_config_wrapper
self._parse_config(data, filename, fileconfig, set())
File “/home/pi/klipper/klippy/configfile.py”, line 255, in _parse_config
self._parse_config_buffer(buffer, filename, fileconfig)
File “/home/pi/klipper/klippy/configfile.py”, line 215, in _parse_config_buffer
fileconfig.readfp(sbuffer, filename)
File “/usr/lib/python2.7/ConfigParser.py”, line 324, in readfp
self._read(fp, filename)
File “/usr/lib/python2.7/ConfigParser.py”, line 546, in _read
raise e
ParsingError: File contains parsing errors: /home/pi/printer.cfg
[line 574]: ’ pin: ~PB7\n’
File contains parsing errors: /home/pi/printer.cfg
[line 574]: ’ pin: ~PB7\n’

Once the underlying issue is corrected, use the “RESTART”
command to reload the config and restart the host software.
Printer is halted
Klipper state: Not ready

I really running out of ideas …

Please post your klippy.log and original printer.cfg and make sure that you do not have strange characters, surplus blanks etc in your cfg

The log would confirm, but it appears you have a space in front of pin.

~PB7 without space worked.

Thanks a lot!