自从我遇到这个问题已经将近一个月了,我真的很感激你的帮助。在尝试登录我的Django Web应用程序时,我在/ OSError / login /上遇到了,我可以在127.0.0.1:8000/admin中登录,但不能在生成错误代码的/Code/ login中登录:
OSError at /accounts/login/
[WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
Request Method: POST
Request URL:
我制作了一个脚本,将pdf文件转换为jpgs文件,然后将这些jpgs文件放在特定的文件夹中。到目前为止,这个脚本运行得很好,但是我一直在VScode终端中得到一个错误,它说: PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:/Users/xxx/Desktop/pdf2jpg/src_files/Files/' 我尝试在运行前关闭该文件,但它仍然有效 from pdf2image import co
下载openALPR库的预编译二进制文件,运行源代码中包含的setup.py进行安装,并运行预编译二进制文件目录中包含的python_test.bat后,我得到以下错误: File "C:\Users\rhenriquez\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openalpr\openalpr.py", line 51, in __init__
self._openalprpy_lib = ctypes.cdll.LoadLibrary("libopenalprpy.dll
我刚刚在我的机器上安装了Python3.10。我去了pip安装熊猫,在AppData临时文件夹中的一个临时文件上得到了一个AppData错误,我尝试过其他库和相同的错误。尝试卸载和重新安装,并得到相同的错误。此外,试图运行CMD作为管理,没有更好的。
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: C:\\Users\\user\\AppData\\Local\\Temp\\tmp1b78532k
我不知道如何关闭我试图在python中删除的文件。代码: merger = PdfFileMerger()
for auth in newAuths:
merger.append(auth)
merger.write(r"C:\stack\overflow.pdf")
for i in newAuths:
os.remove(i) 直到最后两行代码,一切都可以正常工作。它返回:'PermissionError: WinError 32进程无法访问该文件,因为它正被另一个进程使用:‘想知道如何通过访问文件来关闭合并?
我正在尝试做一些类似于dropbox文件夹同步的事情,而且我在添加重叠图标时遇到了问题。我检查了下列指南:
在此之后,我只对Golden的示例做了一些小小的修改: 1.在IsMemberOf-method中,我只想在桌面中的一个文件夹中添加一个覆盖图标,其中包含一个文件'kala.txt‘。2.在GetOverlayInfo-method中,我将路径更改为指向下载中的图标。
运行代码后,我检查了注册表,键在那里,但是图标不会显示。我在32位windows虚拟机上。
守则:
import os
from win32com.shell import shell, shellcon
im
我有一个Python脚本,它作为Windows服务运行。该脚本使用以下命令派生另一个进程:
with subprocess.Popen( args=[self.exec_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) as proc:
这会导致以下错误:
OSError: [WinError 6] The handle is invalid
File "C:\Program Files (x86)\Python35-32\lib\subprocess.py", line 911, in __init__
目前,当我尝试使用pip或pip3做任何事情时,它总是返回以下错误:
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\My local user name\\AppData\\Local\\Temp\\tmpfi3qmtn7'
我不知道导致这个问题的文件是什么,但是我不能用pip安装或卸载软件包,也不能升级pip本身。我安装了Python的最新版本以及Windows 10,而且pip
我找到了模块。我用下面的代码尝试了这个模块:
from multiprocessing_generator import ParallelGenerator
def my_generator():
yield (x*x for x in range(200))
with ParallelGenerator(my_generator(), max_lookahead=100) as g:
for elem in g:
print(elem)
下面是我得到的错误(我在控制台中运行了代码,python文件在我的桌面上):
C:\Users\crd\Desktop
我有一个Python程序,它创建一个SQLite .db文件,然后执行一个.sql脚本来初始化该db中的表TRANSACTIONS。作为我设计的一部分,如果在创建TRANSACTIONS表方面有任何失败,我希望删除.db本身,这样就不会留下一个不完整的数据库。
我的问题是,当我尝试用.db删除os.remove(db_path)文件时,会得到一个Win32错误,即.db文件正在由另一个进程使用。我搞不懂这个过程是什么。
我的模块,initialize_db.py
import sqlite3 as sql
import os
class initialize_db:
# Param
在我维护的(遗留)代码中,人们正在使用WindowsError。我可以继续用OSError替换所有事件,但是遗憾的是,winerror属性被使用了,只在三种情况下--即123:
try:
mtime = int(os.path.getmtime(self._s))
except WindowsError, werr:
if werr.winerror != 123: raise
deprint(u'Unable to determine modified time of %s - probably a unicode error' % s
我正在尝试在‘shutil’模块的帮助下将文件‘A’的内容转换成‘temp’文件。但是,我得到了下面的错误:
[WinError 32] The process cannot access the file because it is being used by another process
我也试着在谷歌上搜索同样的错误,但是他们都没有帮助我。我不确定哪里出了问题。
我使用的是windows10 (64位),我的python版本是3.7。
编码细节如下:
import csv
import shutil
from tempfile import NamedTempo
我对python很陌生,我正在尝试运行一个预先编写的程序,但是不断地收到一个错误,这里是整个错误。
Traceback (most recent call last):
File "C:\source\python\pill.py", line 29, in <module>
ser.open()
File "C:\Python27\lib\site-packages\serial\serialwin32.py", line 66, in open
raise SerialException("could not o
import shutil
os.chdir('D:\Source')
##i for counting number of files
i=0
for file in os.listdir():
# Trying to move the identified file to a different folder
# but thows PermissionError
with open(file,'r',encoding='utf-8')as F:
for line in F:
i