类型错误:预期的 str、字节或 os.PathLike 对象,而不是 NoneType

我最近将pyqtdeploy更新到最新版本(3.1.0)


不幸的是,我收到了无法解决的错误代码。


$ pyqtdeploy

Traceback (most recent call last):

  File "/home/sergent/.local/bin/pyqtdeploy", line 8, in <module>

    sys.exit(main())

  File "/home/sergent/.local/lib/python3.8/site-packages/pyqtdeploy/pyqtdeploy_main.py", line 69, in main

    gui = ProjectGUI(project)

  File "/home/sergent/.local/lib/python3.8/site-packages/pyqtdeploy/gui/project_gui.py", line 59, in __init__

    self._set_project(project)

  File "/home/sergent/.local/lib/python3.8/site-packages/pyqtdeploy/gui/project_gui.py", line 220, in _set_project

    self._name_changed(self._project.name)

  File "/home/sergent/.local/lib/python3.8/site-packages/pyqtdeploy/gui/project_gui.py", line 160, in _name_changed

    title = os.path.basename(name) if name != '' else "Unnamed"

  File "/usr/lib/python3.8/posixpath.py", line 142, in basename

    p = os.fspath(p)

TypeError: expected str, bytes or os.PathLike object, not NoneType

我使用的是 Ubuntu 20.04.1 LTS 请问如何轻松解决此问题?预先感谢您的任何帮助。


交互式爱情
浏览 114回答 1
1回答

拉风的咖菲猫

在新版本中,您需要指定项目名称,例如: pyqtdeploy myproject.pdt 不过,在我的情况下,这会导致不同的错误。但也许这足以解决您的问题。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python