首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由于对USS.jtx的权限被拒绝,Pyinstaller未生成

由于对USS.jtx的权限被拒绝,Pyinstaller未生成
EN

Stack Overflow用户
提问于 2020-07-30 11:26:45
回答 1查看 227关注 0票数 1

在windows上使用pbot.exe安装程序(pyinstaller --onefile main.py --name pyinstaller )时,出现以下错误:

代码语言:javascript
复制
329097 INFO: checking PKG
329097 INFO: Building PKG because PKG-00.toc is non existent
329099 INFO: Building PKG (CArchive) PKG-00.pkg
Cannot find ('nltk_data\AppData\Local\Comms\UnistoreDB\USS.jtx', 'C:\Users\adwaith\AppData\Local\Comms\UnistoreDB\USS.jtx', 1, 'x')
Traceback (most recent call last):
  File "c:\users\adwaith\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\adwaith\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\adwaith\anaconda3\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "c:\users\adwaith\anaconda3\lib\site-packages\PyInstaller\__main__.py", line 114, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\users\adwaith\anaconda3\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\users\adwaith\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 734, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "c:\users\adwaith\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 681, in build
    exec(code, spec_namespace)
  File "C:\Users\adwaith\Documents\pbot_win\pbot.spec", line 20, in <module>
    exe = EXE(pyz,
  File "c:\users\adwaith\anaconda3\lib\site-packages\PyInstaller\building\api.py", line 433, in __init__
    self.pkg = PKG(self.toc, cdict=kwargs.get('cdict', None),
  File "c:\users\adwaith\anaconda3\lib\site-packages\PyInstaller\building\api.py", line 199, in __init__
    self.__postinit__()
  File "c:\users\adwaith\anaconda3\lib\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
    self.assemble()
  File "c:\users\adwaith\anaconda3\lib\site-packages\PyInstaller\building\api.py", line 283, in assemble
    archive = CArchiveWriter(self.name, srctoc + mytoc,
  File "c:\users\adwaith\anaconda3\lib\site-packages\PyInstaller\archive\writers.py", line 336, in __init__
    super(CArchiveWriter, self).__init__(archive_path, logical_toc)
  File "c:\users\adwaith\anaconda3\lib\site-packages\PyInstaller\archive\writers.py", line 63, in __init__
    self._add_from_table_of_contents(logical_toc)
  File "c:\users\adwaith\anaconda3\lib\site-packages\PyInstaller\archive\writers.py", line 88, in _add_from_table_of_contents
    self.add(toc_entry)  # The guts of the archive.
  File "c:\users\adwaith\anaconda3\lib\site-packages\PyInstaller\archive\writers.py", line 383, in add
    fh = open(pathnm, 'rb')
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\adwaith\\AppData\\Local\\Comms\\UnistoreDB\\USS.jtx'

我已经检查了我的机器上是否存在该位置和USS.jtx文件。此外,我尝试搜索USS.jtx文件,但它总是显示在git的上下文中。我确实有一个Github桌面,所以我想也许从git repo内部使用pyinstaller会导致问题。然后,我将整个存储库复制到计算机上的另一个位置,但问题仍然存在。

EN

回答 1

Stack Overflow用户

发布于 2020-08-07 21:21:24

我通常不是一个Windows爱好者,但我在Linkedin上看到了你关于这个的帖子。

在我看来,该文件存在,但您没有读取它的权限。查看this article并确保您具有读取该文件的权限。

要检查这一点,一种快速而棘手的方法是尝试在记事本或Windows中的任何基本文本编辑器中打开该文件。

如果记事本在尝试打开文件时出现错误,则需要修复权限。如果记事本可以在不更改权限的情况下打开它,那么您对运行pyinstaller的方式有些奇怪。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63165743

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档