Skip to content

diamond not running on Ubuntu 16.04 #712

Description

@KlavsKlavsen

First I got:

Traceback (most recent call last):
  File "/tmp/diamond", line 25, in <module>
    from diamond.server import Server
ImportError: No module named diamond.server

Then I added correct search path (as used by setup.py):

for path in [
    os.path.join('/usr', 'share', 'pyshared'),
    os.path.join('/opt', 'diamond', 'lib'),
    os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src'))
]:

(to bin/diamond)

$ /usr/bin/python /usr/bin/diamond
Traceback (most recent call last):
  File "/usr/bin/diamond", line 26, in <module>
    from diamond.server import Server
  File "/usr/share/pyshared/diamond/server.py", line 21, in <module>
    from diamond.utils.classes import initialize_collector
ImportError: No module named utils.classes

Activity

KlavsKlavsen commented on Jun 26, 2018

@KlavsKlavsen
Author

It turns out__init__.py is NOT included in the package-file (for diamond.utils) - diamond and diamond.handler gets it.

KlavsKlavsen commented on Jun 26, 2018

@KlavsKlavsen
Author

build output SAYS it does the right thing though - and setup ( ) in setup.py looks correct:

hard linking src/diamond/handler/__init__.py -> diamond-4.0.830/src/diamond/handler
hard linking src/diamond/utils/__init__.py -> diamond-4.0.830/src/diamond/utils
copying src/diamond/__init__.py -> /home/b56v/Diamond/build/diamond-4.0.830/./build/lib.linux-x86_64-2.7/diamond
copying src/diamond/utils/__init__.py -> /home/b56v/Diamond/build/diamond-4.0.830/./build/lib.linux-x86_64-2.7/diamond/utils
copying src/diamond/handler/__init__.py -> /home/b56v/Diamond/build/diamond-4.0.830/./build/lib.linux-x86_64-2.7/diamond/handler

however contents is missing one of the init.py.. :

$ dpkg --contents build/diamond_4.0.830_all.deb | grep init__
-rw-r--r-- root/root        15 2017-04-18 11:08 ./usr/share/pyshared/diamond/handler/__init__.py
-rw-r--r-- root/root        49 2017-04-18 11:08 ./usr/share/pyshared/diamond/__init__.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions