<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=windows-1252"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you very much for quick response. I just found what's the real
problem: in
./env/nodeshot/lib/python2.7/site-packages/django_hstore/query.py
actually HStoreGeoQuerySet definition is under condition:<br>
<br>
if GEODJANGO_INSTALLED:<br>
<br>
which is defined in
./env/nodeshot/lib/python2.7/site-packages/django_hstore/apps.py that
check if there's a "postgis" in database ENGINE setup of settings.py.
So in case there's no "postgis" pattern in ENGINE string,
HStoreGeoQuerySet is just got missed and it"s not a circular import
problem.<br>
<br>
Then after I changed ENGINE from
'django.db.backends.postgresql_psycopg2' to <br>
'django.contrib.gis.db.backends.postgis', everything worked perfectly
and my nodeshot site is now up in AWS.<br>
<br>
Best regards,<br>
Hui Yu<br>
<br>
Nemesis さんは書きました:
<blockquote cite="mid:56375FBC.4050305@ninux.org" type="cite">
  <meta content="text/html; charset=windows-1252"
 http-equiv="Content-Type">
  <div class="moz-cite-prefix">Hi Hui Yu,<br>
  <br>
this problem has not been reported yet.<br>
  <br>
Could you tell us what procedure are you using to install nodeshot?
Automated or manual? Are you installing from git or pypi?<br>
  <br>
Federico<br>
  <br>
  <br>
  <br>
On 11/01/2015 04:16 AM, Hui Yu wrote:<br>
  </div>
  <blockquote cite="mid:56358424.4070405@gmail.com" type="cite"> Dear
all,<br>
    <br>
I'm new in Python and Django development and trying to build a
community website base on nodeshot on AWS Elastic BeanStalk. Source is
from git clone <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="https://github.com/ninuxorg/nodeshot">https://github.com/ninuxorg/nodeshot</a>.<br>
    <br>
Also the build was successful on my local environment on Fedora 21 with
2.7.8, I'm failing to build the same on Amazon Linux AMI with Python
2.7.9 due to some circular import problem in
./nodeshot/nodeshot/core/base/managers.py as following:<br>
    <br>
(nodeshot)[ec2-user@ip-172-31-12-8 dev]$ python manage.py migrate
--no-initial-data<br>
Traceback (most recent call last):<br>
  File "manage.py", line 10, in <module><br>
    execute_from_command_line(sys.argv)<br>
  File
"/home/ec2-user/works/nodeshot/env/nodeshot/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 338, in execute_from_command_line<br>
    utility.execute()<br>
  File
"/home/ec2-user/works/nodeshot/env/nodeshot/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 312, in execute<br>
    django.setup()<br>
  File
"/home/ec2-user/works/nodeshot/env/nodeshot/local/lib/python2.7/site-packages/django/__init__.py",
line 18, in setup<br>
    apps.populate(settings.INSTALLED_APPS)<br>
  File
"/home/ec2-user/works/nodeshot/env/nodeshot/local/lib/python2.7/site-packages/django/apps/registry.py",
line 108, in populate<br>
    app_config.import_models(all_models)<br>
  File
"/home/ec2-user/works/nodeshot/env/nodeshot/local/lib/python2.7/site-packages/django/apps/config.py",
line 198, in import_models<br>
    self.models_module = import_module(models_module_name)<br>
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in
import_module<br>
    __import__(name)<br>
  File
"/home/ec2-user/works/nodeshot/nodeshot/core/layers/models/__init__.py",
line 8, in <module><br>
    from layer import Layer<br>
  File
"/home/ec2-user/works/nodeshot/nodeshot/core/layers/models/layer.py",
line 10, in <module><br>
    from nodeshot.core.nodes.models import Node<br>
  File
"/home/ec2-user/works/nodeshot/nodeshot/core/nodes/models/__init__.py",
line 1, in <module><br>
    from .node import Node  # noqa<br>
  File
"/home/ec2-user/works/nodeshot/nodeshot/core/nodes/models/node.py",
line 8, in <module><br>
    from nodeshot.core.base.managers import
HStoreGeoAccessLevelPublishedManager as NodeManager<br>
    <b>  File
"/home/ec2-user/works/nodeshot/nodeshot/core/base/managers.py", line 6,
in <module><br>
    from django_hstore.query import HStoreQuerySet, HStoreGeoQuerySet<br>
ImportError: cannot import name HStoreGeoQuerySet</b><br>
    <br>
By looking into the code, it seems like the circular import happens
between ./nodeshot/nodeshot/core/base/managers.py and query.py in
HStore module (in my virtualenv environment
./env/nodeshot/lib/python2.7/site-packages/django_hstore/query.py),
also the next line:<br>
    <br>
from django_hstore.managers import HStoreManager, HStoreGeoManager<br>
    <br>
also has the same problem on HStoreGeoManager with managers.py in
HStore module (in my virtualenv environment
./env/nodeshot/lib/python2.7/site-packages/django_hstore/managers.py)<br>
    <br>
The HStore version and version other components installed are as below:<br>
(nodeshot)[ec2-user@ip-172-31-12-8 dev]$ pip list<br>
You are using pip version 6.0.8, however version 7.1.2 is available.<br>
You should consider upgrading via the 'pip install --upgrade pip'
command.<br>
amqp (1.4.7)<br>
anyjson (0.3.3)<br>
billiard (3.3.0.20)<br>
blessings (1.6)<br>
bpython (0.14.2)<br>
celery (3.1.18)<br>
curtsies (0.1.19)<br>
decorator (4.0.4)<br>
Django (1.8.4)<br>
django-appconf (1.0.1)<br>
django-celery-email (1.1.2)<br>
django-cors-headers (1.1.0)<br>
django-extensions (1.5.7)<br>
django-filebrowser (3.6.1)<br>
django-grappelli (2.7.1)<br>
    <b>django-hstore (1.4)</b><br>
django-leaflet (0.16.0)<br>
django-netfields (0.3.1)<br>
django-redis (4.2.0)<br>
django-rest-swagger (0.3.4)<br>
django-reversion (1.9.3)<br>
django-rosetta (0.7.6)<br>
django-smuggler (0.6.0)<br>
djangorestframework (3.2.3)<br>
djangorestframework-gis (0.9.4)<br>
    <b>djangorestframework-hstore (1.3)</b><br>
drf-extensions (0.2.7)<br>
ecdsa (0.13)<br>
geojson-elevation (0.1)<br>
greenlet (0.4.9)<br>
influxdb (2.9.2)<br>
jsonfield (1.0.3)<br>
kombu (3.0.28)<br>
libcnml (0.9.2)<br>
Markdown (2.6.2)<br>
microsofttranslator (0.5)<br>
mimeparse (0.1.3)<br>
msgpack-python (0.4.6)<br>
netaddr (0.7.18)<br>
netdiff (0.4.4)<br>
netengine (0.1a0)<br>
networkx (1.10)<br>
    <b>nodeshot (1.0.pre-alpha, /home/ec2-user/works/nodeshot)</b><br>
oauthlib (1.0.3)<br>
paramiko (1.15.3)<br>
Pillow (3.0.0)<br>
pip (6.0.8)<br>
ply (3.8)<br>
polib (1.0.7)<br>
psycopg2 (2.6.1)<br>
pyasn1 (0.1.9)<br>
pycrypto (2.6.1)<br>
Pygments (2.0.2)<br>
PyJWT (1.4.0)<br>
pysmi (0.0.6)<br>
pysnmp (4.3.0)<br>
python-dateutil (2.4.2)<br>
python-openid (2.2.5)<br>
python-social-auth (0.2.12)<br>
pytz (2015.6)<br>
PyYAML (3.11)<br>
raven (5.7.2)<br>
redis (2.10.3)<br>
requests (2.8.1)<br>
requests-oauthlib (0.5.0)<br>
setuptools (12.0.5)<br>
simplejson (3.8.0)<br>
six (1.9.0)<br>
tld (0.7.4)<br>
    <br>
Could anyone please kindly advise if the same issue has been reported
in the past and what were the solutions?<br>
    <br>
Thanks & best regards,<br>
Hui Yu<br>
    <br>
    <fieldset class="mimeAttachmentHeader"></fieldset>
    <br>
    <pre wrap="">_______________________________________________
Nodeshot mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:Nodeshot@ml.ninux.org">Nodeshot@ml.ninux.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://ml.ninux.org/mailman/listinfo/nodeshot">http://ml.ninux.org/mailman/listinfo/nodeshot</a>
    </pre>
  </blockquote>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Nodeshot mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nodeshot@ml.ninux.org">Nodeshot@ml.ninux.org</a>
<a class="moz-txt-link-freetext" href="http://ml.ninux.org/mailman/listinfo/nodeshot">http://ml.ninux.org/mailman/listinfo/nodeshot</a>
  </pre>
</blockquote>
<br>
</body>
</html>