Prototype-X / Zabbix-Network-Weathermap

Network weathermap for Zabbix
GNU General Public License v3.0
88 stars 38 forks source link

Error loading module ruamel #6

Open marticardus opened 7 years ago

marticardus commented 7 years ago

Hi, I have an error loading ruamel module

13:41 $ ./weathermap.py 
Traceback (most recent call last):
  File "./weathermap.py", line 10, in <module>
    from config import ConfigLoader, ConfigCreate
  File "/mnt/sda2/marti/projectes/zabbix/Zabbix-Network-Weathermap/config.py", line 5, in <module>
    import ruamel.yaml as yaml3ed
ImportError: No module named 'ruamel'
Prototype-X commented 7 years ago

Hi, sudo pip install ruamel.yaml

marticardus commented 7 years ago

Hi,

I have already installed this package for python2 but scripts are executed with python3

Prototype-X commented 7 years ago

Ok, library ruamel.yaml was update. sudo pip3 install ruamel.yaml. It works now.

marticardus commented 7 years ago

I have an error installing with pip-3.2

# pip-3.2 install ruamel.yaml
Downloading/unpacking ruamel.yaml
  Downloading ruamel.yaml-0.12.14.tar.gz (228Kb): 228Kb downloaded
  Running setup.py egg_info for package ruamel.yaml
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/root/build/ruamel.yaml/setup.py", line 128
        if line.startswith(u'_package_data'):
                                          ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/root/build/ruamel.yaml/setup.py", line 128

    if line.startswith(u'_package_data'):

                                      ^

SyntaxError: invalid syntax

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /root/build/ruamel.yaml
Storing complete log in /root/.pip/pip.log
Prototype-X commented 7 years ago

https://pypi.python.org/pypi/ruamel.yaml Support version python 3.3, 3.4, 3.5 What is your version of Python?

marticardus commented 7 years ago

Right, with 3.2 does not run, with 3.5 works correctly

Thanks you

giovanitestoni commented 7 years ago

I have the same problem.

`~# pip3 install ruamel.yaml Downloading/unpacking ruamel.yaml Downloading ruamel.yaml-0.12.14.tar.gz (228kB): 228kB downloaded Running setup.py (path:/tmp/pip_build_root/ruamel.yaml/setup.py) egg_info for package ruamel.yaml Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2273, in _dep_map return self.dep_map File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2344, in getattr__ raise AttributeError(attr) AttributeError: _Distribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 17, in <module>
  File "/tmp/pip_build_root/ruamel.yaml/setup.py", line 733, in <module>
    main()
  File "/tmp/pip_build_root/ruamel.yaml/setup.py", line 730, in main
    setup(**kw)
  File "/usr/lib/python3.4/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 243, in __init__
    _Distribution.__init__(self,attrs)
  File "/usr/lib/python3.4/distutils/dist.py", line 280, in __init__
    self.finalize_options()
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 276, in finalize_options
    ep.require(installer=self.fetch_build_egg)
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2100, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer)))
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2291, in requires
    dm = self._dep_map
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2281, in _dep_map
    if invalid_marker(marker):
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1186, in is_invalid_marker
    cls.evaluate_marker(text)
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1284, in _markerlib_evaluate
    for key in env.keys():
RuntimeError: dictionary changed size during iteration
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2273, in _dep_map

return self.__dep_map

File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2344, in getattr

raise AttributeError(attr)

AttributeError: _Distribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 17, in

File "/tmp/pip_build_root/ruamel.yaml/setup.py", line 733, in

main()

File "/tmp/pip_build_root/ruamel.yaml/setup.py", line 730, in main

setup(**kw)

File "/usr/lib/python3.4/distutils/core.py", line 108, in setup

_setup_distribution = dist = klass(attrs)

File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 243, in init

_Distribution.__init__(self,attrs)

File "/usr/lib/python3.4/distutils/dist.py", line 280, in init

self.finalize_options()

File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 276, in finalize_options

ep.require(installer=self.fetch_build_egg)

File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2100, in require

working_set.resolve(self.dist.requires(self.extras),env,installer)))

File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2291, in requires

dm = self._dep_map

File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2281, in _dep_map

if invalid_marker(marker):

File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1186, in is_invalid_marker

cls.evaluate_marker(text)

File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1284, in _markerlib_evaluate

for key in env.keys():

RuntimeError: dictionary changed size during iteration


Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/ruamel.yaml Storing debug log for failure in /root/.pip/pip.log ~# python3 -V Python 3.4.3 ` Can you help me?

Tks

Prototype-X commented 7 years ago

Hi. Try pip3 install ruamel.yaml==0.11.7

giovanitestoni commented 7 years ago

Thanks ;)