无法导入Brightway2-从输入pickle.load中跑出

时间:2019-04-02 16:19:25

标签: python pickle

我像往常一样尝试导入brightway2并得到一个EOFError:超出输入范围。有什么想法吗?

EOFError                                  Traceback (most recent call last)
<ipython-input-1-a542e04465b0> in <module>
----> 1 import brightway2 as bw``
      2 import pandas as pd
      3 import matplotlib as mp



~\Miniconda3\envs\memo\lib\site-packages\brightway2\__init__.py in <module>

我已经用anaconda提示符导入了Brightway2。这是什么问题?

      1 # -*- coding: utf-8 -*
----> 2 from bw2data import *
      3 from bw2calc import *
      4 from bw2io import *
      5 

~\Miniconda3\envs\memo\lib\site-packages\bw2data\__init__.py in <module>
     33 from .project import projects
     34 from .utils import set_data_dir
---> 35 from .meta import (
     36     dynamic_calculation_setups,
     37     calculation_setups,

~\Miniconda3\envs\memo\lib\site-packages\bw2data\meta.py in <module>
    190 preferences = Preferences()
    191 weightings = WeightingMeta()
--> 192 calculation_setups = CalculationSetups()
    193 dynamic_calculation_setups = DynamicCalculationSetups()

~\Miniconda3\envs\memo\lib\site-packages\bw2data\serialization.py in __init__(self, dirpath)
    117             self.filename
    118         )
--> 119         self.load()
    120 
    121     def load(self):

加载序列化的数据。是否创建文件?

~\Miniconda3\envs\memo\lib\site-packages\bw2data\serialization.py in load(self)
    122         """Load the serialized data. Creates the file if not yet present."""
    123         try:
--> 124             self.data = self.deserialize()
    125         except IOError:
    126             # Create if not present

~\Miniconda3\envs\memo\lib\site-packages\bw2data\serialization.py in deserialize(self)
    235 
    236     def deserialize(self):
--> 237         return self.unpack(pickle.load(open(self.filepath, "rb")))

EOFError: Ran out of input

文件是否为空?

0 个答案:

没有答案