satnet-project / server

Repository with the source code for the server of the SATNet network.
Apache License 2.0
2 stars 1 forks source link

SintaxError after clean installation #27

Closed sgongar closed 9 years ago

sgongar commented 9 years ago

When I try to run the server using: python manage.py I get this output:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    management.execute_from_command_line(sys.argv)
  File "/home/sgongar/server/.venv/local/lib/python2.7/site-packages/django/core/management /__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/home/sgongar/server/.venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
    django.setup()
  File "/home/sgongar/server/.venv/local/lib/python2.7/site-packages/django/__init__.py", line 21, in  setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/sgongar/server/.venv/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/home/sgongar/server/.venv/local/lib/python2.7/site-packages/django/apps/config.py", line 87, in create
    module = import_module(entry)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/sgongar/server/.venv/local/lib/python2.7/site-packages/periodically/__init__.py", line 73, in <module>
    autodiscover()
  File "/home/sgongar/server/.venv/local/lib/python2.7/site-packages/periodically/__init__.py", line 18, in autodiscover
    mod = import_module(app)
  File "/home/sgongar/server/.venv/local/lib/python2.7/site-packages/django/utils/importlib.py", line 46, in import_module
    __import__(name)
  File "/home/sgongar/server/services/configuration/__init__.py", line 20, in <module>
    from services.configuration.jrpc.views import channels, rules, tle
  File "/home/sgongar/server/services/configuration/jrpc/views/channels.py", line 20, in <module>
    from services.configuration.models import segments, bands, channels
  File "/home/sgongar/server/services/configuration/models/segments.py", line 24, in <module>
    from services.common import gis
  File "/home/sgongar/server/services/common/gis.py", line 20, in <module>
    from services.common import misc
  File "/home/sgongar/server/services/common/misc.py", line 71
    print('Empty list', file=output)
                        ^
SyntaxError: invalid syntax

I'm using the last release of Debian 7 and Python 2.7. The system is running on a VBox machine with nothing else.

crespum commented 9 years ago

That syntax belongs to Python 3. Are you inside of the right virtualenv?

rtubio commented 9 years ago

Xabi is right, have you set up a Python 3 environment? Please, check the version that you are using within your virtual environment with the following commands:

source .venv/bin/activate
python --version

... and let us know!

sgongar commented 9 years ago

The installation script set up a virtualenv with python 2.7.3 however if I do the same actions in Debian 8 I get a Python 3 environment with no problems.

So, the problem could be this, maybe we must correct the installation script.

rtubio commented 9 years ago

Yes, that is the problem. The Python 3 environment is automatically set up in a Debian 8, meanwhile in Debian 7 the environment that the script installs is a Python 2.7.3. This is because the first version of the software was developed for Debian 7 and Python 2.7, meanwhile the current "development_3k" branch is being developed for Debian 8 and Python 3.

Do you have any concerns in installing Debian 8 and Python 3?

The "legacy" Debian 7 and Python 2.7 installation is kept in the script for compatibility issues but should be used only when installing the branch "master". Maybe we should rename the branch "devleopment_3k" to master and "master" to legacy.

sgongar commented 9 years ago

No, the server runs fine in Debian 8. Rename the branches isn't a bad idea.

rtubio commented 9 years ago

Is this still an issue or can we close it?

crespum commented 9 years ago

If Debian 7 won't support server/development_3k we should rename the branches as proposed by @rtp-calpoly. Anyway, we can close this issue.

sgongar commented 9 years ago

Ok, @rtp-calpoly can you rename the branches? I close the issue right now.

rtubio commented 9 years ago

Please post a new is he with this task. My idea was to rename the branches once development_3k was stable, that is, after conducting real tests during the summer. As of today, only the master branch has been deployed and tested; therefore, I think that it is better to wait....