rafalp / Misago

Misago is fully featured modern forum application that is fast, scalable and responsive.
http://misago-project.org
GNU General Public License v2.0
2.56k stars 529 forks source link

Trying to install: python manage.py migrate #972

Closed songproducer closed 6 years ago

songproducer commented 6 years ago
Traceback (most recent call last):
  File "manage.py", line 23, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 347, in execute
    django.setup()
  File "/usr/local/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.6/site-packages/django/apps/registry.py", line 112, in populate
    app_config.import_models()
  File "/usr/local/lib/python3.6/site-packages/django/apps/config.py", line 198, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/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 "/usr/local/lib/python3.6/site-packages/Misago-0.16.0-py3.6.egg/misago/users/models/__init__.py", line 2, in <module>
    from .user import AnonymousUser, Online, User, UsernameChange
  File "/usr/local/lib/python3.6/site-packages/Misago-0.16.0-py3.6.egg/misago/users/models/user.py", line 134, in <module>
    class User(AbstractBaseUser, PermissionsMixin):
  File "/usr/local/lib/python3.6/site-packages/Misago-0.16.0-py3.6.egg/misago/users/models/user.py", line 274, in User
    class Meta:
  File "/usr/local/lib/python3.6/site-packages/Misago-0.16.0-py3.6.egg/misago/users/models/user.py", line 278, in Meta
    where={'is_staff': True},
  File "/usr/local/lib/python3.6/site-packages/Misago-0.16.0-py3.6.egg/misago/core/pgutils.py", line 16, in __init__
    super(PgPartialIndex, self).__init__(fields, name)
TypeError: __init__() takes 1 positional argument but 3 were given
rafalp commented 6 years ago

Can you please provide list of libraries that is installed on your setup? Running pip list in your terminal should give you it.

songproducer commented 6 years ago
aiodns (1.1.1)
aiohttp (3.0.6)
aiohttp-security (0.2.0)
aiohttp-session (2.3.0)
aiopg (0.13.2)
aioredis (1.1.0)
asgi-redis (1.0.0)
asgiref (1.0.0)
asn1crypto (0.24.0)
async-timeout (2.0.0)
attrs (17.4.0)
autobahn (18.3.1)
Automat (0.6.0)
beautifulsoup4 (4.6.0)
bleach (2.0.0)
captcha (0.2.4)
certifi (2018.1.18)
cffi (1.11.5)
channels (1.0.3)
chardet (3.0.4)
ChatterBot (0.8.4)
chatterbot-corpus (1.1.1)
confusable-homoglyphs (3.0.0)
constantly (15.1.0)
coreapi (2.3.3)
coreschema (0.0.4)
cryptography (2.1.4)
daphne (1.0.3)
defusedxml (0.5.0)
dj-database-url (0.4.2)
Django (2.0.3)
django-allauth (0.35.0)
django-appconf (1.0.2)
django-captcha (1.0.0)
django-crispy-forms (1.7.2)
django-db-mailer (2.3.19)
django-debug-toolbar (1.9.1)
django-dotenv (1.4.1)
django-el-pagination (3.1.0)
django-eventstream (2.0.0)
django-grip (1.8.0)
django-htmlmin (0.10.0)
django-imagekit (4.0.2)
django-leaflet (0.23.0)
django-markdown-app (0.9.4.1)
django-modelcluster (4.1)
django-mptt (0.8.7)
django-ranged-response (0.2.0)
django-registration (2.4.1)
django-rest-swagger (2.1.2)
django-simple-captcha (0.5.6)
django-taggit (0.22.2)
django-treebeard (4.2.1)
django-watson (1.5.2)
djangorestframework (3.7.7)
draftjs-exporter (2.0.0)
drf-elasticsearch-dsl (0.1.4)
elasticsearch (6.1.1)
elasticsearch-dsl (6.1.0)
enum34 (1.1.6)
facepy (1.0.9)
Faker (0.8.11)
future (0.16.0)
gripcontrol (3.2.1)
hiredis (0.2.0)
html5lib (0.999999999)
hyperlink (18.0.0)
idna (2.6)
idna-ssl (1.0.1)
incremental (17.5.0)
ipaddress (1.0.19)
itypes (1.1.0)
Jinja2 (2.10)
Markdown (2.6.2)
MarkupSafe (1.0)
mathparse (0.1.1)
Misago (0.16.0)
msgpack-python (0.4.8)
multidict (4.1.0)
nltk (3.2.5)
oauthlib (2.0.6)
olefile (0.45.1)
openapi-codec (1.3.2)
passlib (1.7.1)
path.py (10.3.1)
pbr (3.1.1)
pilkit (2.0)
Pillow (4.3.0)
pip (9.0.1)
pipenv (11.5.2)
psycopg2 (2.7.4)
psycopg2-binary (2.7.4)
pubcontrol (2.4.2)
pyasn1 (0.4.2)
pyasn1-modules (0.2.1)
pycares (2.3.0)
pycparser (2.18)
PyJWT (1.6.0)
pymongo (3.6.1)
pyobjc (4.1)
pyobjc-core (4.1)
pyobjc-framework-Accounts (4.1)
pyobjc-framework-AddressBook (4.1)
pyobjc-framework-AppleScriptKit (4.1)
pyobjc-framework-AppleScriptObjC (4.1)
pyobjc-framework-ApplicationServices (4.1)
pyobjc-framework-Automator (4.1)
pyobjc-framework-AVFoundation (4.1)
pyobjc-framework-AVKit (4.1)
pyobjc-framework-CalendarStore (4.1)
pyobjc-framework-CFNetwork (4.1)
pyobjc-framework-CloudKit (4.1)
pyobjc-framework-Cocoa (4.1)
pyobjc-framework-Collaboration (4.1)
pyobjc-framework-ColorSync (4.1)
pyobjc-framework-Contacts (4.1)
pyobjc-framework-ContactsUI (4.1)
pyobjc-framework-CoreBluetooth (4.1)
pyobjc-framework-CoreData (4.1)
pyobjc-framework-CoreLocation (4.1)
pyobjc-framework-CoreML (4.1)
pyobjc-framework-CoreServices (4.1)
pyobjc-framework-CoreSpotlight (4.1)
pyobjc-framework-CoreText (4.1)
pyobjc-framework-CoreWLAN (4.1)
pyobjc-framework-CryptoTokenKit (4.1)
pyobjc-framework-DictionaryServices (4.1)
pyobjc-framework-DiskArbitration (4.1)
pyobjc-framework-EventKit (4.1)
pyobjc-framework-ExceptionHandling (4.1)
pyobjc-framework-ExternalAccessory (4.1)
pyobjc-framework-FinderSync (4.1)
pyobjc-framework-FSEvents (4.1)
pyobjc-framework-GameCenter (4.1)
pyobjc-framework-GameController (4.1)
pyobjc-framework-GameKit (4.1)
pyobjc-framework-GameplayKit (4.1)
pyobjc-framework-ImageCaptureCore (4.1)
pyobjc-framework-IMServicePlugIn (4.1)
pyobjc-framework-InputMethodKit (4.1)
pyobjc-framework-InstallerPlugins (4.1)
pyobjc-framework-InstantMessage (4.1)
pyobjc-framework-Intents (4.1)
pyobjc-framework-IOSurface (4.1)
pyobjc-framework-iTunesLibrary (4.1)
pyobjc-framework-LatentSemanticMapping (4.1)
pyobjc-framework-LaunchServices (4.1)
pyobjc-framework-libdispatch (4.1)
pyobjc-framework-LocalAuthentication (4.1)
pyobjc-framework-MapKit (4.1)
pyobjc-framework-MediaAccessibility (4.1)
pyobjc-framework-MediaLibrary (4.1)
pyobjc-framework-MediaPlayer (4.1)
pyobjc-framework-ModelIO (4.1)
pyobjc-framework-MultipeerConnectivity (4.1)
pyobjc-framework-NetFS (4.1)
pyobjc-framework-NetworkExtension (4.1)
pyobjc-framework-NotificationCenter (4.1)
pyobjc-framework-OpenDirectory (4.1)
pyobjc-framework-Photos (4.1)
pyobjc-framework-PhotosUI (4.1)
pyobjc-framework-PreferencePanes (4.1)
pyobjc-framework-PubSub (4.1)
pyobjc-framework-QTKit (4.1)
pyobjc-framework-Quartz (4.1)
pyobjc-framework-SafariServices (4.1)
pyobjc-framework-SceneKit (4.1)
pyobjc-framework-ScreenSaver (4.1)
pyobjc-framework-ScriptingBridge (4.1)
pyobjc-framework-SearchKit (4.1)
pyobjc-framework-Security (4.1)
pyobjc-framework-SecurityFoundation (4.1)
pyobjc-framework-SecurityInterface (4.1)
pyobjc-framework-ServiceManagement (4.1)
pyobjc-framework-Social (4.1)
pyobjc-framework-SpriteKit (4.1)
pyobjc-framework-StoreKit (4.1)
pyobjc-framework-SyncServices (4.1)
pyobjc-framework-SystemConfiguration (4.1)
pyobjc-framework-Vision (4.1)
pyobjc-framework-WebKit (4.1)
pyOpenSSL (17.5.0)
python-dateutil (2.6.1)
python-dotenv (0.8.2)
python-twitter (3.4.1)
python3-openid (3.1.0)
pyttsx3 (2.7)
pytz (2018.3)
PyYAML (3.12)
redis (2.10.5)
requests (2.18.4)
requests-oauthlib (0.8.0)
service-identity (17.0.0)
setuptools (38.5.2)
simplejson (3.13.2)
six (1.11.0)
sorl-thumbnail (12.4.1)
SQLAlchemy (1.2.5)
sqlparse (0.2.4)
stevedore (1.28.0)
text-unidecode (1.2)
Twisted (17.9.0)
twython (3.6.0)
txaio (2.9.0)
Unidecode (0.4.21)
uritemplate (3.0.0)
urllib3 (1.22)
virtualenv (15.1.0)
virtualenv-clone (0.3.0)
wagtail (2.0)
wagtailfontawesome (1.1.3)
wagtailsocialfeed (0.4.1)
webencodings (0.5.1)
Werkzeug (0.12.2)
wheel (0.30.0)
Willow (1.1)
yarl (1.1.1)
zope.interface (4.4.3)
rafalp commented 6 years ago

As I've feared, the versions of libraries installed are invalid. From the quick look at the list it seems that you are not using virtualenv or any other tool for isolating installed libraries between projects. This is a problem because different projects have conflicting dependencies between each other.

Please create fresh virtualenv and install Misago using it.

raeuz commented 6 years ago

This issue occurs when using Django 2 above. Not matter virturalenv.

rafalp commented 6 years ago

Misago requires Django 1.11 to work. We currently only support latest LTS release for Django.