I've installed GeoDjango Spatial Database libraries using Enterprise DB Stack for Postgres 10 and it includes following packages. I am using Windows 10 OS and needed to setup GeoDjango. Please assist
PostGIS 2.4.3 bundle includes
PostGIS 2.4.3 w
GDAL 2.2.3,
GEOS 3.6.2, Proj 4.9.3,
pgRouting 2.5.2,
osm2pgrouting 2.3.3,
ogr_fdw 1.0.5
But now on Python I get this error below and I tried many posted answers but couldn't make it work. Quick hint will be great help.
Below is the error:
(gigfinder) C:\Users\dell\gigfinder\gigfinder>python manage.py makemigrations
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Users\dell\gigfinder\lib\site-packages\django\core\management\__init__.py", line 350, in execute_from_command_line
utility.execute()
File "C:\Users\dell\gigfinder\lib\site-packages\django\core\management\__init__.py", line 324, in execute
django.setup()
File "C:\Users\dell\gigfinder\lib\site-packages\django\__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\dell\gigfinder\lib\site-packages\django\apps\registry.py", line 108, in populate
app_config.import_models(all_models)
File "C:\Users\dell\gigfinder\lib\site-packages\django\apps\config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "c:\python27\Lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\auth\models.py", line 4, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\auth\base_user.py", line 49, in <module>
class AbstractBaseUser(models.Model):
File "C:\Users\dell\gigfinder\lib\site-packages\django\db\models\base.py", line 108, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "C:\Users\dell\gigfinder\lib\site-packages\django\db\models\base.py", line 299, in add_to_class
value.contribute_to_class(cls, name)
File "C:\Users\dell\gigfinder\lib\site-packages\django\db\models\options.py", line 263, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "C:\Users\dell\gigfinder\lib\site-packages\django\db\__init__.py", line 36, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "C:\Users\dell\gigfinder\lib\site-packages\django\db\utils.py", line 212, in __getitem__
backend = load_backend(db['ENGINE'])
File "C:\Users\dell\gigfinder\lib\site-packages\django\db\utils.py", line 116, in load_backend
return import_module('%s.base' % backend_name)
File "c:\python27\Lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\db\backends\postgis\base.py", line 5, in <module>
from .features import DatabaseFeatures
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\db\backends\postgis\features.py", line 1, in <module>
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\db\backends\base\features.py", line 4, in <module>
from django.contrib.gis.db.models import aggregates
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\db\models\__init__.py", line 2, in <module>
from django.contrib.gis.db.models.aggregates import * # NOQA
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\db\models\aggregates.py", line 1, in <module>
from django.contrib.gis.db.models.fields import ExtentField
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\db\models\fields.py", line 1, in <module>
from django.contrib.gis import forms
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\forms\__init__.py", line 3, in <module>
from .fields import ( # NOQA
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\forms\fields.py", line 4, in <module>
from django.contrib.gis.geos import GEOSException, GEOSGeometry
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\geos\__init__.py", line 5, in <module>
from .collections import ( # NOQA
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\geos\collections.py", line 9, in <module>
from django.contrib.gis.geos.geometry import (
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\geos\geometry.py", line 10, in <module>
from django.contrib.gis import gdal
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\gdal\__init__.py", line 48, in <module>
from django.contrib.gis.gdal.driver import Driver # NOQA
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\gdal\driver.py", line 5, in <module>
from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as rcapi
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\gdal\prototypes\ds.py", line 9, in <module>
from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal
File "C:\Users\dell\gigfinder\lib\site-packages\django\contrib\gis\gdal\libgdal.py", line 48, in <module>
lgdal = CDLL(lib_path)
File "c:\python27\Lib\ctypes\__init__.py", line 366, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found
Related
Please I am getting this error after installing brownie using pipx. I tried running "brownie --version" and I got the error below. can someone assist in resolving this pls? The python version on my system is upto date but I observed when I installed brownie, it showed an old version.
C:\Users\OGIDAN TOLU>brownie --version
INFO: Could not find files for the given pattern(s).
Traceback (most recent call last):
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\users\ogidan tolu\.local\bin\brownie.exe\__main__.py", line 4, in <module>
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\__init__.py", line 6, in <module>
from brownie.project import compile_source, run
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\__init__.py", line 3, in <module>
from .main import ( # NOQA 401
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\main.py", line 41, in <module>
from brownie.network import web3
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\__init__.py", line 4, in <module>
from .account import Accounts
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\account.py", line 29, in <module>
from .gas.bases import GasABC
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\gas\bases.py", line 7, in <module>
from brownie.network.web3 import web3
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\web3.py", line 208, in <module>
web3 = Web3()
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\web3.py", line 30, in __init__
self.enable_unstable_package_management_api()
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\web3\main.py", line 289, in enable_unstable_package_management_api
from web3.pm import PM # noqa: F811
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\web3\pm.py", line 36, in <module>
from ethpm import (
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ethpm\__init__.py", line 8, in <module>
from .package import Package # noqa: F401
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ethpm\package.py", line 60, in <module>
from ethpm.uri import (
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ethpm\uri.py", line 15, in <module>
from ethpm._utils.backend import (
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ethpm\_utils\backend.py", line 13, in <module>
from ipfshttpclient.exceptions import (
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ipfshttpclient\__init__.py", line 11, in <module>
from .client import DEFAULT_ADDR, DEFAULT_BASE
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ipfshttpclient\client\__init__.py", line 21, in <module>
from . import bitswap
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ipfshttpclient\client\bitswap.py", line 3, in <module>
from . import base
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ipfshttpclient\client\base.py", line 274, in <module>
def returns_no_item(func: _inner_func_t[ty.NoReturn]) -> _returns_single_wrapper_t:
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\typing.py", line 251, in inner
return func(*args, **kwds)
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\typing.py", line 824, in __class_getitem__
params = tuple(_type_check(p, msg) for p in params)
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\typing.py", line 824, in <genexpr>
params = tuple(_type_check(p, msg) for p in params)
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\typing.py", line 135, in _type_check
raise TypeError(f"Plain {arg} is not valid as type argument")
TypeError: Plain typing.NoReturn is not valid as type argument
I want to install this script( https://github.com/SpEcHiDe/AnyDLBot)
on my server, but I was surprised that I cannot run any Python script and this error message appears to me every time I run the Python script :
(VENV) root#Hermania:/datadrive/AnyDLBot# python3 -m anydlbot Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/datadrive/AnyDLBot/anydlbot/__main__.py", line 8, in <module>
from pyrogram import Client
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/__init__.py", line 23, in <module>
from .client import *
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/__init__.py", line 19, in <module>
from .client import Client
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/client.py", line 40, in <module>
from pyrogram.client.methods.password.utils import compute_check
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/methods/__init__.py", line 19, in <module>
from .bots import Bots
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/methods/bots/__init__.py", line 19, in <module>
from .answer_callback_query import AnswerCallbackQuery
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/methods/bots/answer_callback_query.py", line 20, in <module>
from pyrogram.client.ext import BaseClient
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/ext/__init__.py", line 19, in <module>
from .base_client import BaseClient
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/ext/base_client.py", line 28, in <module>
from ..parser import Parser
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/parser/__init__.py", line 19, in <module>
from .parser import Parser
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/parser/parser.py", line 23, in <module>
from .html import HTML
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/parser/html.py", line 109, in <module>
class HTML:
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/parser/html.py", line 110, in HTML
def __init__(self, client: Union["pyrogram.BaseClient", None]):
File "/usr/lib/python3.5/typing.py", line 552, in __getitem__
dict(self.__dict__), parameters, _root=True)
File "/usr/lib/python3.5/typing.py", line 512, in __new__
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "/usr/lib/python3.5/typing.py", line 190, in __subclasscheck__
self._eval_type(globalns, localns)
File "/usr/lib/python3.5/typing.py", line 177, in _eval_type
eval(self.__forward_code__, globalns, localns),
File "<string>", line 1, in <module>
AttributeError: module 'pyrogram' has no attribute 'BaseClient'
For your information, I changed versions of Python, but I faced the same problem ☹️☹️☹️☹️☹️☹️
I haven't touched a project in a long time and realized I upgraded my django to version 1.11.12. Trying to re-run project (runserver) and found several out of date packages (easy-thumbnails and psycopg2). Ran pip install upgrade on those. Now when I run, I get the following error and it seems like it is coming form my models? Not sure what it is telling me though or the proper course of action. Maybe there was another upgrade step I missed when I upgraded to django 1.11? (sorry been ages since I touched this code)
Unhandled exception in thread started by <function wrapper at 0x104ab2500>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 228, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 116, in inner_run
autoreload.raise_last_exception()
File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 251, in raise_last_exception
six.reraise(*_exception)
File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 228, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models()
File "/usr/local/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/shane.thomas/programming/sw_nga_site/swsite/models.py", line 12, in <module>
from filer.fields.image import FilerImageField
File "/usr/local/lib/python2.7/site-packages/filer/fields/image.py", line 4, in <module>
from ..models import Image
File "/usr/local/lib/python2.7/site-packages/filer/models/__init__.py", line 3, in <module>
from .clipboardmodels import * # flake8: noqa
File "/usr/local/lib/python2.7/site-packages/filer/models/clipboardmodels.py", line 9, in <module>
from . import filemodels
File "/usr/local/lib/python2.7/site-packages/filer/models/filemodels.py", line 18, in <module>
from .foldermodels import Folder
File "/usr/local/lib/python2.7/site-packages/filer/models/foldermodels.py", line 240, in <module>
mptt.register(Folder)
File "/usr/local/lib/python2.7/site-packages/mptt/__init__.py", line 12, in register
from mptt.models import MPTTModelBase
File "/usr/local/lib/python2.7/site-packages/mptt/models.py", line 379, in <module>
class MPTTModel(six.with_metaclass(MPTTModelBase, models.Model)):
File "/usr/local/lib/python2.7/site-packages/django/utils/six.py", line 808, in __new__
return meta(name, bases, d)
File "/usr/local/lib/python2.7/site-packages/mptt/models.py", line 262, in __new__
cls = super_new(meta, class_name, bases, class_dict)
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 162, in __new__
new_class.add_to_class(obj_name, obj)
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 325, in add_to_class
value.contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/site-packages/mptt/managers.py", line 81, in contribute_to_class
super(TreeManager, self).contribute_to_class(model, name)
File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line 120, in contribute_to_class
setattr(model, name, ManagerDescriptor(self))
AttributeError: can't set attribute
I am calling a python script from another python script,irrespective of the output the python script I am calling I get the following error in stderr,I googled but couldn't find anything concrete,am clueless as to why am getting this error?does anyone have any idea on how to fix it?
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 151, in _run_module_as_main
mod_name, loader, code, fname = _get_module_details(mod_name)
File "C:\Python27\lib\runpy.py", line 109, in _get_module_details
return _get_module_details(pkg_main_name)
File "C:\Python27\lib\runpy.py", line 101, in _get_module_details
loader = get_loader(mod_name)
File "C:\Python27\lib\pkgutil.py", line 464, in get_loader
return find_loader(fullname)
File "C:\Python27\lib\pkgutil.py", line 474, in find_loader
for importer in iter_importers(fullname):
File "C:\Python27\lib\pkgutil.py", line 430, in iter_importers
__import__(pkg)
File "C:\Python27\lib\site-packages\pip\__init__.py", line 14, in <module>
from pip.utils import get_installed_distributions, get_prog
File "C:\Python27\lib\site-packages\pip\utils\__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
File "C:\Python27\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 35,
import email.parser
File "C:\Python27\lib\email\parser.py", line 12, in <module>
from email.feedparser import FeedParser
File "C:\Python27\lib\email\feedparser.py", line 27, in <module>
from email import message
File "C:\Python27\lib\email\message.py", line 16, in <module>
import email.charset
File "C:\Python27\lib\email\charset.py", line 13, in <module>
import email.base64mime
File "C:\Python27\lib\email\base64mime.py", line 40, in <module>
from email.utils import fix_eols
File "C:\Python27\lib\email\utils.py", line 27, in <module>
import random
File "C:\Python27\lib\random.py", line 49, in <module>
import hashlib as _hashlib
File "C:\Python27\lib\hashlib.py", line 138, in <module>
_hashlib.openssl_md_meth_names)
AttributeError: 'module' object has no attribute 'openssl_md_meth_names'
Try to run brew cleanup and after that brew postinstall python.
For more info see this thread
In one of my django 1.6 apps, SOME_APP, I attempt to hook up a tastypie signal so that I can have API keys generated on User creation, as in the tastypie docs:
http://django-tastypie.readthedocs.org/en/latest/authentication.html
in MY_SITE/SOME_APP/signals.py I have:
from django.contrib.auth.models import User
from django.db import models
from tastypie.models import create_api_key
models.signals.post_save.connect(create_api_key, sender=User)
and in MY_SITE/SOME_APP/__init__.py I have:
from . import signals
When I attempt to run my development server, I get the following traceback:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/core/management/base.py", line 280, in execute
translation.activate('en-us')
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 130, in activate
return _trans.activate(language)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 188, in activate
_active.value = translation(language)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 177, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 159, in _fetch
app = import_module(appname)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/USER/git/MY_SITE/SOME_APP/__init__.py", line 5, in <module>
from . import signals
File "/home/USER/git/MY_SITE/SOME_APP/signals.py", line 12, in <module>
from tastypie.models import create_api_key
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/tastypie/models.py", line 32, in <module>
from tastypie.compat import AUTH_USER_MODEL
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/tastypie/compat.py", line 14, in <module>
User = get_user_model()
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 127, in get_user_model
user_model = get_model(app_label, model_name)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/db/models/loading.py", line 271, in get_model
self._populate()
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/db/models/loading.py", line 78, in _populate
self.load_app(app_name)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/db/models/loading.py", line 99, in load_app
models = import_module('%s.models' % app_name)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/debug_toolbar/models.py", line 63, in <module>
patch_root_urlconf()
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/debug_toolbar/models.py", line 51, in patch_root_urlconf
reverse('djdt:render_panel')
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 480, in reverse
app_list = resolver.app_dict[ns]
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 310, in app_dict
self._populate()
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 262, in _populate
for pattern in reversed(self.url_patterns):
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 346, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 341, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/USER/git/MY_SITE/MY_SITE/urls.py", line 13, in <module>
from SOME_APP.api.resources import PostResource #for tastypie REST API access
File "/home/USER/git/MY_SITE/SOME_APP/api/resources.py", line 6, in <module>
from tastypie.resources import ModelResource
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/tastypie/resources.py", line 19, in <module>
from tastypie.authentication import Authentication
File "/home/USER/.virtualenvs/virt-develop/local/lib/python2.7/site-packages/tastypie/authentication.py", line 14, in <module>
from tastypie.compat import User, username_field
ImportError: cannot import name User
What is causing this error and how can I fix it?
Thank you for any thoughts and suggestions :)