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

Execution failing #50

Closed
MisterT2 opened this issue Jul 7, 2012 · 8 comments
Closed

Execution failing #50

MisterT2 opened this issue Jul 7, 2012 · 8 comments

Comments

@MisterT2
Copy link

MisterT2 commented Jul 7, 2012

Hi,
Already Glance-addict for a while (v 1.2), I tried latest version (1.4) on my Ubuntu Lucid.
Installation was done via .tar.gz file, and the command "sudo python setup.py install"

First, I had to install Ubuntu package python-setuptools, as this is not available by default on this release (sudo apt-get install python-setuptools)

During Glances installation procedure, it detectereleasedd incorrect version of python-psutil and install it itself.

Then, all looks fine...
... but I get the following error message when launching "glances":

Traceback (most recent call last):
File "/usr/local/bin/glances", line 9, in
load_entry_point('Glances==1.4', 'console_scripts', 'glances')()
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 299, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2229, in load_entry_point
return ep.load()
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1948, in load
entry = import(self.module_name, globals(),globals(), ['name'])
ImportError: No module named glances

I have no experience of Python, so, may be this is very straight forward ?

Thanks,

@nicolargo
Copy link
Owner

Hi, thanks for the feedback.

Can you try with the following archive: https://github.com/downloads/nicolargo/glances/glances-1.4.tar.gz

Nicolas

@nicolargo
Copy link
Owner

For an easy installation, you can also try the official PPA:

https://launchpad.net/~arnaud-hartmann/+archive/glances-stable

@nicolargo
Copy link
Owner

Same issue on my Debian server... :(

@nicolargo
Copy link
Owner

A very dirty hack:

sudo rm /usr/local/bin/glances

sudo ln -s /usr/local/lib/python2.6/dist-packages/glances-1.4-py2.6.egg/glances/glances.py /usr/local/bin/glances

...

@MisterT2
Copy link
Author

MisterT2 commented Jul 8, 2012

The "dirty hack" works fine, that's all what I need for now...
I let this comment open, if you ever come to propose a "clean hack"... :-)

Thanks a lot Nico (for the tip and for the tool) !

@MisterT2
Copy link
Author

MisterT2 commented Jul 8, 2012

Oups....
I was a little bit too fast answering there...

I tried your hack, but I get:

/usr/local/bin/glances:617: DeprecationWarning: this property is deprecated; use Process.get_nice() method instead
procstat['nice'] = proc.nice
Traceback (most recent call last):
File "/usr/local/bin/glances", line 2064, in
main()
File "/usr/local/bin/glances", line 2037, in main
screen.update(stats)
File "/usr/local/bin/glances", line 1058, in update
self.flush(stats)
File "/usr/local/bin/glances", line 1054, in flush
self.display(stats)
File "/usr/local/bin/glances", line 1030, in display
self.displayLoad(stats.getLoad(), stats.getCore())
File "/usr/local/bin/glances", line 1152, in displayLoad
"{:.2f}".format(load['min1']), 8)
ValueError: zero length field name in format

(note that I had to slightly modify the link in the "hack":
sudo ln -sf /usr/local/lib/python2.6/dist-packages/Glances-1.4-py2.6.egg/glances/glances.py /usr/local/bin/glances
)

And when I try the PPA repository, I get version 1.3.7 installed (not 1.4.0 !)

@nicolargo
Copy link
Owner

This issue (ValueError: zero length field name in format / #52) has been solved yesterday in the last build.

Download the last archive: https://github.com/downloads/nicolargo/glances/glances-1.4.tar.gz

Nicolas

@MisterT2
Copy link
Author

MisterT2 commented Jul 8, 2012

This latest version + the "horrible hack" => works fine !

Many thanks :-)

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

2 participants