I'm working with this repo:
<https://github.com/IntelligentTrading/data>

For reference, the latter of these two lines is the offending one, I believe:

```
from apps.channel.models import ExchangeData
from apps.channel.models.exchange_data import POLONIEX

```

The page has instructions. I've almost gotten to the end, then I run this:

> 
> python manage.py poloniex\_polling
> 
> 
> 

For reference, here's the code for poloniex\_polling.py:

```
import json
import logging
import schedule
import time

from django.core.management.base import BaseCommand
from requests import get, RequestException

from apps.channel.models import ExchangeData
from apps.channel.models.exchange_data import POLONIEX

logger = logging.getLogger(__name__)

class Command(BaseCommand):
    help = "Polls data from Poloniex every 1 minute"

    def handle(self, *args, **options):
        logger.info("Getting ready to poll Poloniex...")
        schedule.every(1).minutes.do(poll_latest_poloniex_data)

        keep_going=True
        while keep_going:
            try:
                schedule.run_pending()
                time.sleep(1)
            except Exception as e:
                logger.debug(str(e))
                logger.info("Poloniex polling shut down.")
                keep_going = False

def poll_latest_poloniex_data():
    try:
        logger.info("polling for Poloniex data...")
        req = get('https://poloniex.com/public?command=returnTicker')

        poloniex_data_point = ExchangeData.objects.create(
            source=POLONIEX,
            data=req.json(), # the exact json from the request data
            timestamp=time.time() # now
        )
        logger.info("Saving Poloniex data...")

    except RequestException:
        return 'Error to collect data from Poloniex'

```

When I run `python manage.py poloniex_polling` , I get:

```
INFO:settings:Deployment environment detected: LOCAL
INFO:settings:Importing vendor_services_settings
INFO:settings:LOCAL environment detected. Importing local_settings.py
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home/cerulean/.virtualenvs/ITF/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/home/cerulean/.virtualenvs/ITF/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/cerulean/.virtualenvs/ITF/lib/python3.6/site-packages/django/core/management/__init__.py", line 224, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/home/cerulean/.virtualenvs/ITF/lib/python3.6/site-packages/django/core/management/__init__.py", line 36, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/home/cerulean/.virtualenvs/ITF/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/cerulean/Code/ITF/data-fork/data/apps/channel/management/commands/poloniex_polling.py", line 10, in <module>
    from apps.channel.models.exchange_data import POLONIEX
ImportError: cannot import name 'POLONIEX'

```

It seems as though 

```
from apps.channel.models.exchange_data import POLONIEX

```

in poloniex\_polling.py is attempting to import a model called POLONIEX before it is instantiated.

From my experience struggling with getting this app up-and-running, it's usually a higher-level problem that's going on. Maybe it's a database that's not running? To wit, I'm running postgresql server as a service. The Database has data in it, and localhost:8000 is working. 

here's what exchange\_data.py in the models folder looks like:

```
from django.db import models
from django.contrib.postgres.fields import JSONField
from unixtimestampfield.fields import UnixTimeStampField

    class ExchangeData(models.Model):
        source = models.CharField(max_length=128)
        data = JSONField(default="")
        timestamp = UnixTimeStampField(null=False)

        # MODEL PROPERTIES

        # MODEL FUNCTIONS

```

Thank you very much.