Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diamond not running on Ubuntu 16.04 #712

Open
KlavsKlavsen opened this issue Jun 26, 2018 · 2 comments
Open

diamond not running on Ubuntu 16.04 #712

KlavsKlavsen opened this issue Jun 26, 2018 · 2 comments

Comments

@KlavsKlavsen
Copy link

KlavsKlavsen commented Jun 26, 2018

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
@KlavsKlavsen
Copy link
Author

KlavsKlavsen commented Jun 26, 2018

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

@KlavsKlavsen
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant