TACC / tacc_stats

TACC Stats is an automated resource-usage monitoring and analysis package.
GNU Lesser General Public License v2.1
41 stars 15 forks source link

trying with python 2.5 #14

Closed einjen closed 1 year ago

einjen commented 5 years ago

when trying with python 2.7.5 in virtualenv

(Fram) [einjen@login-1-6 Fram]$ manage.py migrate Traceback (most recent call last): File "/home/einjen/tacc/Fram/bin/manage.py", line 6, in exec(compile(open(file).read(), file, 'exec')) File "/home/einjen/tacc/Fram/tacc_stats/tacc_stats/site/manage.py", line 10, in execute_from_command_line(sys.argv) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/init.py", line 364, in execute_from_command_line
utility.execute() File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/init.py", line 356, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv self.execute(*args, cmd_options) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/base.py", line 327, in execute self.check() File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/base.py", line 359, in check include_deployment_checks=include_deployment_checks, File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 62, in _run_checks issues.extend(super(Command, self)._run_checks(kwargs)) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/base.py", line 346, in _run_checks return checks.run_checks(**kwargs) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks new_errors = check(app_configs=app_configs) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/checks/urls.py", line 16, in check_url_config return check_resolver(resolver) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/checks/urls.py", line 26, in check_resolver return check_method() File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/urls/resolvers.py", line 256, in check for pattern in self.url_patterns: File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/utils/functional.py", line 35, in get res = instance.dict[self.name] = self.func(instance) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/urls/resolvers.py", line 407, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/utils/functional.py", line 35, in get res = instance.dict[self.name] = self.func(instance) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/urls/resolvers.py", line 400, in urlconf_module return import_module(self.urlconf_name) File "/usr/lib64/python2.7/importlib/init.py", line 37, in import_module import(name) File "/home/einjen/tacc/Fram/tacc_stats/tacc_stats/site/tacc_stats_site/urls.py", line 2, in from django.urls import path ImportError: cannot import name path

rtevans commented 5 years ago

Hi,

Thanks for the great input. I haven’t gotten a lot regarding the build process so apologies for the roadblocks.

The earlier error you observed

psycopg2.ProgrammingError: relation "machine_host" does not exist LINE 1: SELECT DISTINCT "machine_host"."name" FROM "machine_host" OR…

may be because a

manage.py makemigrations

is necessary to perform before the

manage.py migrate.

Regarding issue #14:

Django changes pretty rapidly. The current TACC Stats should be compatible with Django version 2.0.7. Can you check if you are using the same version? Also, if you cloned the Django repo recently then Python3 will be required.

Cheers,

Todd

R. Todd Evans, Ph.D. High Performance Computing Texas Advanced Computing Center The University of Texas at Austin rtevans@tacc.utexas.edumailto:rtevans@tacc.utexas.edu

On Sep 23, 2018, at 9:43 AM, einjen notifications@github.com<mailto:notifications@github.com> wrote:

when trying with python 2.7.5 in virtualenv

(Fram) [einjen@login-1-6 Fram]$ manage.py migrate Traceback (most recent call last): File "/home/einjen/tacc/Fram/bin/manage.py", line 6, in exec(compile(open(file).read(), file, 'exec')) File "/home/einjen/tacc/Fram/tacc_stats/tacc_stats/site/manage.py", line 10, in execute_from_command_line(sys.argv) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/init.py", line 364, in execute_from_command_line utility.execute() File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/init.py", line 356, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv self.execute(*args, cmd_options) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/base.py", line 327, in execute self.check() File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/base.py", line 359, in check include_deployment_checks=include_deployment_checks, File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 62, in _run_checks issues.extend(super(Command, self)._run_checks(kwargs)) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/management/base.py", line 346, in _run_checks return checks.run_checks(**kwargs) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks new_errors = check(app_configs=app_configs) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/checks/urls.py", line 16, in check_url_config return check_resolver(resolver) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/core/checks/urls.py", line 26, in check_resolver return check_method() File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/urls/resolvers.py", line 256, in check for pattern in self.url_patterns: File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/utils/functional.py", line 35, in get res = instance.dict[self.name] = self.func(instance) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/urls/resolvers.py", line 407, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/utils/functional.py", line 35, in get res = instance.dict[self.name] = self.func(instance) File "/home/einjen/tacc/Fram/lib/python2.7/site-packages/django/urls/resolvers.py", line 400, in urlconf_module return import_module(self.urlconf_name) File "/usr/lib64/python2.7/importlib/init.py", line 37, in import_module import(name) File "/home/einjen/tacc/Fram/tacc_stats/tacc_stats/site/tacc_stats_site/urls.py", line 2, in from django.urls import path ImportError: cannot import name path

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/TACC/tacc_stats/issues/14, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AE-W7PkbWbH-sjQbz8tSJIjEe1tYXVkNks5ud536gaJpZM4W1uko.

einjen commented 5 years ago

This is what I do: (Fram) [einjen@login-1-6 Fram]$ python --version Python 3.6.3

477 virtualenv Fram --system-site-packages 478 source Fram/bin/activate 479 cd Fram/ 480 ls 481 git clone https://github.com/TACC/tacc_stats 482 vim tacc_stats/tacc_stats.ini 483 pip install -e tacc_stats/ 484 manage.py makemigrations (Fram) [einjen@login-1-6 Fram]$ manage.py makemigrations
Traceback (most recent call last): File "/home/einjen/tacc/Fram/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute return self.cursor.execute(sql, params) psycopg2.ProgrammingError: relation "machine_host" does not exist LINE 1: SELECT DISTINCT "machine_host"."name" FROM "machine_host" OR...

einjen commented 5 years ago

Not sure if this is of any use for you, but I got the listend.py to work with this:

--- old_listend.py 2018-10-02 17:19:30.627678969 +0200 +++ new_listend.py 2018-10-02 17:28:57.838454167 +0200 @@ -6,6 +6,7 @@ from fcntl import flock, LOCK_EX, LOCK_NB

def on_message(channel, method_frame, header_frame, body):