首页 > 其他分享 >Bad magic number for central directory

Bad magic number for central directory

时间:2024-03-10 16:55:37浏览次数:30  
标签:python3.11 central py excel Bad File directory home line

Bad magic number for central directory

运行代码输出如下bug:

  File "/home/a/Prediction/Predict_Models.py", line 153, in save_results
    existing_df = pd.read_excel(output_file_path)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anaconda3/envs/python310/lib/python3.11/site-packages/pandas/io/excel/_base.py", line 495, in read_excel
    io = ExcelFile(
         ^^^^^^^^^^
  File "/home/anaconda3/envs/python310/lib/python3.11/site-packages/pandas/io/excel/_base.py", line 1550, in __init__
    ext = inspect_excel_format(
          ^^^^^^^^^^^^^^^^^^^^^
  File "/home/anaconda3/envs/python310/lib/python3.11/site-packages/pandas/io/excel/_base.py", line 1419, in inspect_excel_format
    with zipfile.ZipFile(stream) as zf:
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anaconda3/envs/python310/lib/python3.11/zipfile.py", line 1304, in __init__
    self._RealGetContents()
  File "/home/anaconda3/envs/python310/lib/python3.11/zipfile.py", line 1401, in _RealGetContents
    raise BadZipFile("Bad magic number for central directory")
zipfile.BadZipFile: Bad magic number for central directory

背景:

尝试把多个进程的运行结果写入到同一个excel表格的不同sheet中。

解决方法:

写如不同的excel表格中。

标签:python3.11,central,py,excel,Bad,File,directory,home,line
From: https://www.cnblogs.com/benbenlzw/p/18064369

相关文章

  • P2866 [USACO06NOV] Bad Hair Day S
    原题链接题解1.倒序求2.求每个点前有多少高度比自己小的3.高度函数图像是有升有降的,由于要求比自己小的,在求完之后,我们把所有点前比自己小的点缩起来放到自己身上,然后把那些点删掉,再插入自己这样序列就变成了降序,遍历的时候也只需要遍历那些降序点code#include<bits/stdc++......
  • Android mount: bad /etc/fstab: No such file or directory
    没有root权限的原因,需要su切换到root用户https://github.com/termux/termux-packages/issues/7256 I/OerrorRMX1901CN:/#mount/dev/block/by-name/abl/mnt/mntablmount:'/dev/block/by-name/abl'->'/mnt/mntabl':I/Oerrorablxbl都会出现I/Oerror,不知道什么原因......
  • linux脚本:/bin/bash^M: bad interpreter: No such file or directory(/bin/sh^M).sh: no
    origin如图,运行一个脚本文件报错: 原因:在执行shell脚本时提示这样的错误主要是由于shell脚本文件是dos格式,即每一行结尾以\r\n来标识,而unix格式的文件行尾则以\n来标识解决方法,用dos2unixfilename命令,,直接把文件转换为unix格式 其他解决方法:(1)使用linux命令dos2unixfi......
  • Qt Cannot open include file: 'QtConcurrent': No such file or directory
    假期手痒用Qt写了个便笺程序,其中文件操作用到了QtConcurrent模块。噼里啪啦,一通猛如虎的操作下来,代码写完了,愉快地build+run一套,结果报错了:(Cannotopenincludefile:'QtConcurrent':Nosuchfileordirectory编译不过一声吼,操起鼠标查google。官方文档就是这么写的看......
  • Bad Request
    错误的请求方法HTTP协议定义了一些常见的请求方法,例如GET、POST、PUT、DELETE等。服务器根据不同的请求方法执行相应的操作。如果客户端使用了服务器不支持的请求方法,服务器将返回400BadRequest错误。为了解决这个问题,客户端需要使用服务器支持的请求方法。错误的请求体格式请......
  • 解析HTTP错误码400 Bad Request及其常见原因与解决方法
    解析HTTP错误码400BadRequest及其常见原因与解决方法1.引言在进行web开发过程中,我们经常会遇到各种HTTP错误码。HTTP错误码用于表示服务器对请求的响应状态,帮助我们定位和解决问题。本文将重点解析HTTP错误码400BadRequest,探讨其常见原因和解决方法。HTTP错误码的作用和分类......
  • 解析HTTP错误码400 Bad Request及其常见原因与解决方法
    解析HTTP错误码400BadRequest及其常见原因与解决方法1.引言在进行web开发过程中,我们经常会遇到各种HTTP错误码。HTTP错误码用于表示服务器对请求的响应状态,帮助我们定位和解决问题。本文将重点解析HTTP错误码400BadRequest,探讨其常见原因和解决方法。HTTP错误码的作用和分类......
  • signature hdr data: BAD, no. of btyes(9088) out of range 问题排查与解决方案
    在使用yum工具安装gcc的时候,报出了signaturehdrdata:BAD,no.ofbtyes(9088)outofrange的问题这是由于centos8中rpm工具存在的一个bug,在校验安装包头部大小的时候,应当限制为64M,但是实际限制了64k这个问题存在于rpm-4.14.3-4.el8.x86_64等版本查看你本机的rpm版本可......
  • C# Directory.GetFileSystemEntries(path) Directory.EnumerateFileSystemEntries(pat
    usingSystem;usingSystem.IO;staticvoidMain(string[]args){DirectoryDemo();}staticvoidDirectoryDemo(){stringpath="D:\\C\\ConsoleApp13";Console.WriteLine($"Directory.GetCurrentDirectory():{Director......
  • yolo7检测学习Bubbliiiing的视频有感——(2)FileNotFoundError: [Errno 2] No such file
    这个问题作为老程序员是不应该犯的,因为只是相对路径和绝对路径的问题按照步骤将对应的数据集放入目录后,运行voc_annotation.py想要生成两个txt文件,结果发现报错FileNotFoundError:[Errno2]Nosuchfileordirectory其实就是classes_path和VOCdevkit_path的路径不对,像我自己......