Why PyCharm couldn't import a module?

Viewed 59

OS- Neon Linux I have the following command line output:

katya7@katya7-comp:/home/katya/work/prostor/okular_gost$ /home/katya/work/prostor/cuisine/cuisine/lbp -b okular_gost.yml source -f okular_gost bullseye
/home/katya/work/prostor/cuisine/cuisine/cuisine/program.py:86: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  options.update(**yaml.load(ymlfile))
/usr/lib/python3/dist-packages/debian/changelog.py:484: UserWarning: Found eof where expected first heading
  warnings.warn(message)
Копирование debian/21.11.70.21 в /home/katya/work/prostor/cuisine/build/okular_gost/ 
Модификация debian/control 
Traceback (most recent call last):
  File "/home/katya/work/prostor/cuisine/cuisine/lbp", line 222, in <module>
    args.func(args)
  File "/home/katya/work/prostor/cuisine/cuisine/lbp", line 120, in do_source
    source.prepare(profile)
  File "/home/katya/work/prostor/cuisine/cuisine/cuisine/source.py", line 59, in prepare
    self.prepare_debian(profile)
  File "/home/katya/work/prostor/cuisine/cuisine/cuisine/source.py", line 194, in prepare_debian
    self.prepare_control(profile)
  File "/home/katya/work/prostor/cuisine/cuisine/cuisine/source.py", line 206, in prepare_control
    self._control = Control(self, filename=self.path.joinpath(self.controlfile))
  File "/usr/lib/python3.8/pathlib.py", line 931, in joinpath
    return self._make_child(args)
  File "/usr/lib/python3.8/pathlib.py", line 713, in _make_child
    drv, root, parts = self._parse_args(args)
  File "/usr/lib/python3.8/pathlib.py", line 667, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

It seems lbp script runs. Now I trying to run it in PyCharm 2022.2.2 Please see screenshots enter image description here enter image description here

Please tell me, why PyCharm can't import a module?

1 Answers

I have found the solution!

File -> Settings -> Project: 'myprojectname' -> Python Interpreter -> Add Interpreter Then set up the following parameters enter image description here

Then in "Run configuration" select newly created interpreter

Related