svdhoog / FLAViz

FLAViz: Flexible Large-scale Agent Visualization Library
GNU General Public License v3.0
1 stars 4 forks source link

Errors: Running out of the box #8

Closed svdhoog closed 6 years ago

svdhoog commented 6 years ago

This is for running the GitHub FLAViz repo with the test data included.

Installation:

[FLAViz/src/visualisation_scripts]$ python3 main.py config
- Directory [results_test] was created and is used for output files
- Directory [timeseries] was created and is used for output files
/usr/lib/python3/dist-packages/matplotlib/collections.py:549: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == 'face':
- Directory [results_test] is used for output files
- Directory [scatterplot] was created and is used for output files
- Directory [results_test] is used for output files
- Directory [histogram] was created and is used for output files
- Directory [results_test] is used for output files
- Directory [histogram] is used for output files
- Directory [results_test] is used for output files
- Directory [scatterplot] is used for output files
- Directory [results_test] is used for output files
/usr/lib/python3/dist-packages/pandas/compat/scipy.py:68: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  score = values[idx]
- Directory [timeseries] is used for output files
- Directory [results_test] is used for output files
- Directory [boxplot] was created and is used for output files
Traceback (most recent call last):
  File "main.py", line 174, in <module>
    summary_and_plot(idx, P, df_main, args.parameterpath[0])  # plot index, parameter object, data, parameter_filepath
  File "main.py", line 110, in summary_and_plot
    return plot_function[key]()
  File "main.py", line 95, in plt_boxplot
    B.boxplot(param, outpath)
  File "/media/sander/DataStorage1/GIT/GitHub/FLAViz@svdhoog/FLAViz/src/visualisation_scripts/plots.py", line 29, in boxplot
    self.num_plot_mapper(self.__P.num_plots(self.idx), B)
  File "/media/sander/DataStorage1/GIT/GitHub/FLAViz@svdhoog/FLAViz/src/visualisation_scripts/plots.py", line 21, in num_plot_mapper
    return options[val]()
  File "/media/sander/DataStorage1/GIT/GitHub/FLAViz@svdhoog/FLAViz/src/visualisation_scripts/plots.py", line 18, in <lambda>
    one_plot = lambda: obj.one_output()
  File "/media/sander/DataStorage1/GIT/GitHub/FLAViz@svdhoog/FLAViz/src/visualisation_scripts/plots.py", line 684, in one_output
    self.plot_boxplot(ax, y[r], self.__data.columns[col])
  File "/media/sander/DataStorage1/GIT/GitHub/FLAViz@svdhoog/FLAViz/src/visualisation_scripts/plots.py", line 664, in plot_boxplot
    ax.set_title(le_label)
AttributeError: 'dict' object has no attribute 'set_title'
svdhoog commented 6 years ago

Solution

Uninstall all dependencies in the package manager (using synaptic or apt-get), and use python3-pip instead. This will install the latest versions.

svdhoog commented 6 years ago

List of encountered errors

Error 1

$ python3 src/visualisation_scripts/main.py src/visualisation_scripts/config
Traceback (most recent call last):
  File "src/visualisation_scripts/main.py", line 137, in <module>
    df = pnl.to_frame()  # convert panel to Dataframe
  File "/usr/lib/python3/dist-packages/pandas/core/panel.py", line 813, in to_frame
    mask = com.notnull(self.values).all(axis=0)
  File "/usr/lib/python3/dist-packages/pandas/core/common.py", line 276, in notnull
    return -res
TypeError: The numpy boolean negative, the `-` operator, is not supported, use the `~` operator or the logical_not function instead.
Closing remaining open files:/media/sander/DataStorage1/GIT/GitHub/FLAViz@svdhoog/FLAViz/data/visualisation/CentralBank.h5...done/media/sander/DataStorage1/GIT/GitHub/FLAViz@svdhoog/FLAViz/data/visualisation/Firm.h5...done/media/sander/DataStorage1/GIT/GitHub/FLAViz@svdhoog/FLAViz/data/visualisation/Eurostat.h5...done

Solution Install pandas 0.22.0 using python3-pip:

$ sudo python3 -mpip install -U pandas

Error 2

Traceback (most recent call last):
  File "/usr/lib/python3.5/tkinter/__init__.py", line 36, in <module>
    import _tkinter
ImportError: No module named '_tkinter'

Solution Install package python3-tk