New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Has stopped working after upgrade 2.0.4 → 2.0.5 #132

Closed
jock-tanner opened this Issue Sep 14, 2015 · 29 comments

Comments

Projects
None yet
9 participants
@jock-tanner
Copy link

jock-tanner commented Sep 14, 2015

Here’s a traceback.

/home/tanner/workspace/ROOTWELT/studio/project/env/bin/python3.4 /home/tanner/workspace/ROOTWELT/studio/project/studio/manage.py runserver
Traceback (most recent call last):
  File "/home/tanner/workspace/ROOTWELT/studio/project/studio/manage.py", line 8, in <module>
    execute_from_command_line(sys.argv)
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/django/core/management/__init__.py", line 312, in execute
    django.setup()
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/django/apps/config.py", line 86, in create
    module = import_module(entry)
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/home/tanner/workspace/ROOTWELT/studio/project/studio/mptt_comments/__init__.py", line 1, in <module>
    from mptt_comments.models import MPTTComment
  File "/home/tanner/workspace/ROOTWELT/studio/project/studio/mptt_comments/models.py", line 8, in <module>
    from tinymce.models import HTMLField
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/tinymce/models.py", line 6, in <module>
    from tinymce import widgets as tinymce_widgets
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/tinymce/widgets.py", line 10, in <module>
    import tinymce.settings
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/tinymce/settings.py", line 17, in <module>
    JS_ROOT = getattr(settings, 'TINYMCE_JS_ROOT', finders.find('tiny_mce', all=False))
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/django/contrib/staticfiles/finders.py", line 249, in find
    for finder in get_finders():
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/django/contrib/staticfiles/finders.py", line 264, in get_finders
    yield get_finder(finder_path)
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/functools.py", line 448, in wrapper
    result = user_function(*args, **kwds)
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/django/contrib/staticfiles/finders.py", line 277, in get_finder
    return Finder()
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/django/contrib/staticfiles/finders.py", line 129, in __init__
    app_configs = apps.get_app_configs()
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/django/apps/registry.py", line 137, in get_app_configs
    self.check_apps_ready()
  File "/home/tanner/workspace/ROOTWELT/studio/project/env/lib/python3.4/site-packages/django/apps/registry.py", line 124, in check_apps_ready
    raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.

Process finished with exit code 1
@Natim

This comment has been minimized.

Copy link
Collaborator

Natim commented Sep 16, 2015

Oh can you try to import tinymce after staticfiles?
If you are not using staticfile then we've got to make a fix.
Can you try changing 2.0.4...2.0.5diff-1d5fa3b685a77f9452e28aa136cd8319R3 from line 3 to line 17?

@jock-tanner

This comment has been minimized.

Copy link

jock-tanner commented Sep 16, 2015

Yes I use contrib.staticfiles. Here's what my settings.INSTALLED_APPS looks like:

INSTALLED_APPS = [
    'grappelli',
    'modeltranslation',
    'filebrowser',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_comments',
    'django.contrib.sites',
    'django.contrib.humanize',
    'rosetta',
    'social.apps.django_app.default',
    'account',
    'django_bleach',
    'tinymce',
    'sorl.thumbnail',
    'mce_filebrowser',
    'sitetree',
    'bootstrapform',
    'pinax_theme_bootstrap',
    'bootstrap_pagination',
    'mathfilters',
    'haystack',
    'mptt',
    'captcha',
    'rest_framework',
    'text_blocks',
    'navigation',
    'blog',
    'bootstrap_calendar',
    'mptt_comments',
]

Moving import statement from line 3 to line 17 didn't help (guess it shouldn't in my case).

@yaniv14

This comment has been minimized.

Copy link

yaniv14 commented Oct 20, 2015

I've got the same problem.

@svfat

This comment has been minimized.

Copy link

svfat commented Nov 1, 2015

Same problem with django-tinymce 2.0.5. Rollback to version 2.0.4 helped in my case.

pip install django-tinymce==2.0.4

@vanadium23 vanadium23 added the bug label Feb 29, 2016

@vanadium23

This comment has been minimized.

Copy link
Collaborator

vanadium23 commented Feb 29, 2016

Is there still an issue with that or are it reproduced on more recent version - 2.2.0.

@gandalfar

This comment has been minimized.

Copy link

gandalfar commented Feb 29, 2016

I'm trying to use it for a project and I'm seeing this error with 2.2.0. It happens after I do

from tinymce.models import HTMLField
in models.py

Django==1.8.4 and python 3.4

Downgrading to 2.0.4 makes TinyMCE work correctly.

@Natim

This comment has been minimized.

Copy link
Collaborator

Natim commented Feb 29, 2016

These are the changes that occured between 2.0.4 and 2.0.5.

2.0.4...2.0.5

The fact that we use finder at the app loading rather than latter when the function is used can be the problem here.

@vanadium23

This comment has been minimized.

Copy link
Collaborator

vanadium23 commented Feb 29, 2016

@gandalfar Can you somehow give a minimal reproducable code example so we can debug it?

@vanadium23

This comment has been minimized.

Copy link
Collaborator

vanadium23 commented Mar 15, 2016

@gandalfar I have provide some basic app for specified version. Can you check it or add what other package do you use?

@gandalfar

This comment has been minimized.

Copy link

gandalfar commented Mar 15, 2016

Hi, thanks for being so proactive about this issue. I was swamped with organising conference, but I'm now looking through the 100+ packages in requirements.txt to see if I can reproduce this problem.

@gandalfar

This comment has been minimized.

Copy link

gandalfar commented Mar 15, 2016

I can't reproduce this on a simple app. Will try again later on primary app, to see if I can find cause by removing things instead of adding them.

@gandalfar

This comment has been minimized.

Copy link

gandalfar commented Mar 19, 2016

Ok, managed to somehow reproduce this. If I comment out 'haystack' from django-haystack==2.4.1 in my project, then it doesn't crash with django-tinymce==2.3.0

I have to do some more work, to get it to crash in your sample app.

@wyx2000

This comment has been minimized.

Copy link

wyx2000 commented Mar 22, 2016

Same problem here, is there a hotfix for this?

@Natim

This comment has been minimized.

Copy link
Collaborator

Natim commented Mar 22, 2016

@wyx2000 can you update to django-tinymce 2.3.0?

@wyx2000

This comment has been minimized.

Copy link

wyx2000 commented Mar 23, 2016

Updated. Still same issue. I have to change the code to remove the line 3 and hardcode the root path

Sent from my Samsung device

-------- Original message --------
From: Rémy HUBSCHER notifications@github.com
Date: 2016-03-22 9:14 AM (GMT-08:00)
To: aljosa/django-tinymce django-tinymce@noreply.github.com
Cc: wyx2000 wyx1999@hotmail.com
Subject: Re: [django-tinymce] Has stopped working after upgrade 2.0.4 → 2.0.5 (#132)

@wyx2000 can you update to django-tinymce 2.3.0


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@ayubbeck

This comment has been minimized.

Copy link

ayubbeck commented Jun 27, 2016

I had the same problem. Moving my import Model into function fixed the issue!
http://stackoverflow.com/questions/35659282/django-post-migrate-signal-issue

@adrianmoisey

This comment has been minimized.

Copy link

adrianmoisey commented Nov 28, 2018

Does anyone have a solution for this issue?

@Natim

This comment has been minimized.

Copy link
Collaborator

Natim commented Nov 28, 2018

There is definitely an issue here. The fix would be to create a lazy finder function. If anyone is interested in filling a pull-request

@Natim

This comment has been minimized.

Copy link
Collaborator

Natim commented Jan 4, 2019

Can anyone review #243 and tell me if it works properly for them?

@adrianmoisey

This comment has been minimized.

Copy link

adrianmoisey commented Jan 15, 2019

Just tested it, works well 👍

@Natim

This comment has been minimized.

Copy link
Collaborator

Natim commented Jan 15, 2019

Thanks I am going to make a release then.

@Natim Natim closed this in #243 Jan 15, 2019

@Natim

This comment has been minimized.

Copy link
Collaborator

Natim commented Jan 15, 2019

Does anyone needs a 2.0.6 release for this?

@adrianmoisey

This comment has been minimized.

Copy link

adrianmoisey commented Jan 15, 2019

I do! That would be great if you could do a release.

@Natim

This comment has been minimized.

Copy link
Collaborator

Natim commented Jan 15, 2019

Please meet 2.0.7

@Natim Natim reopened this Jan 15, 2019

@Natim Natim closed this Jan 15, 2019

@adrianmoisey

This comment has been minimized.

Copy link

adrianmoisey commented Jan 15, 2019

Thanks! I appreciate it.

@adrianmoisey

This comment has been minimized.

Copy link

adrianmoisey commented Jan 16, 2019

Is it possible to get this fix on top of 2.6.0?

@Natim

This comment has been minimized.

Copy link
Collaborator

Natim commented Jan 16, 2019

Is there anything blocking you to use 2.8.0 directly instead?

@adrianmoisey

This comment has been minimized.

Copy link

adrianmoisey commented Jan 17, 2019

We're trying to upgrade from Django 1.8.
2.6.0 gives us support for 1.11, and still maintains 1.8 support.

@adrianmoisey

This comment has been minimized.

Copy link

adrianmoisey commented Jan 21, 2019

Would you like me to get a 2.6.1 branch going?
I don't mind doing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment