weixin_51019180 2022-10-15 15:32 采纳率: 0%
浏览 14

pickle.load加载pickle文件出错,查了网上的解决措施都无法解决


# -*- coding: utf-8 -*-
import numpy as np
import pickle
from geopy.distance import geodesic
import os
import math

A = math.degrees(-math.pi)
# Change the current working directory to the location of 'Combined Trajectory_Label_Geolife' folder.
# # 将当前工作目录改为'Combined Trajectory_Label_Geolife'文件夹的位置。
filename =r'../Combined Trajectory_Label_Geolife/Revised_Trajectory_Label_Array.pickle'
with open('Revised_Trajectory_Label_Array.pickle', 'rb') as f:
    Trajectory_Label_Array = pickle.load(f)

img

  • 写回答

2条回答 默认 最新

  • buysnow 2022-10-15 15:40
    关注

    改成:with open(filename, 'rb') as f:

    评论

报告相同问题?

问题事件

  • 创建了问题 10月15日

悬赏问题

  • ¥15 为什么eclipse不能再下载了?
  • ¥15 编辑cmake lists 明明写了project项目名,但是还是报错怎么回事
  • ¥15 关于#计算机视觉#的问题:求一份高质量桥梁多病害数据集
  • ¥15 特定网页无法访问,已排除网页问题
  • ¥50 如何将脑的图像投影到颅骨上
  • ¥15 提问一个关于vscode相关的环境配置问题,就是输入中文但是显示不出来,代码在idea可以显示中文,但在vscode不行,不知道怎么配置环境
  • ¥15 netcore使用PuppeteerSharp截图
  • ¥20 这张图页头,页脚具体代码该怎么写?
  • ¥20 WPF MVVM模式 handycontrol 框架, hc:SearchBar 控件 Text="{Binding NavMenusKeyWords}" 绑定取不到值
  • ¥15 需要手写数字信号处理Dsp三个简单题 不用太复杂