gforcada / haproxy_log_analysis

HAProxy log analyzer
https://pypi.org/project/haproxy_log_analysis
GNU General Public License v3.0
88 stars 35 forks source link

Can't run 1.3 version at all -- can't import a module named line #16

Closed elyograg closed 4 years ago

elyograg commented 8 years ago

The 1.3 version will install just fine with the setup.py script, but won't run. Here's the trace:

Traceback (most recent call last):
  File "/usr/local/bin/haproxy_log_analysis", line 9, in <module>
    load_entry_point('haproxy-log-analysis==1.3', 'console_scripts', 'haproxy_log_analysis')()
  File "/usr/local/lib/python2.7/dist-packages/haproxy_log_analysis-1.3-py2.7.egg/haproxy/main.py", line 290, in console_script
    main(arguments)
  File "/usr/local/lib/python2.7/dist-packages/haproxy_log_analysis-1.3-py2.7.egg/haproxy/main.py", line 256, in main
    log_file.parse_file()
  File "/usr/local/lib/python2.7/dist-packages/haproxy_log_analysis-1.3-py2.7.egg/haproxy/haproxy_logfile.py", line 36, in parse_file
    self._load()
  File "/usr/local/lib/python2.7/dist-packages/haproxy_log_analysis-1.3-py2.7.egg/haproxy/haproxy_logfile.py", line 62, in _load
    pickle_data = pickler.load()
ImportError: No module named line

Version 2.0b0 installs and runs, but I ran into a different issue with that version.

gforcada commented 8 years ago

@elyograg could you try to remove the pickled file and run it again? Failing at pickler.load makes me think that you have probably used version 2.x and then switched back and the pickled data expects some classes that are no longer there.

elyograg commented 8 years ago

Sure, if you tell me exactly how to do that. I know very little about python.

gforcada commented 8 years ago

@elyograg no need for python skills at all for this. To speed up nth's runs haproxy_log_analysis creates a YOUR_LOG_FILE.pickle file which is used if found. Remove that file and run again, it would be enough.

elyograg commented 8 years ago

That might help if I knew what YOUR_LOG_FILE should be replaced with, and what directory it's going to be in.

gforcada commented 8 years ago

@elyograg how do you run haproxy_log_analysis? You have to pass the log file as a command line argument, so that's the filename you need to append .pickle on it and remove.

gforcada commented 4 years ago

@elyograg if you are still having problems, you might try version 4.0.0 and give further feedback, otherwise I'm closing it.

Thanks for using the tool and reporting the problems you found with it!