jazzband / django-tinymce

TinyMCE integration for Django
http://django-tinymce.readthedocs.org/
MIT License
1.25k stars 317 forks source link

Couldn't install #390

Closed hatimmakki closed 2 years ago

hatimmakki commented 2 years ago

Hi

I followed all the steps for my Django project, but I am still getting errors when running the app.

I didn't update the model code yet

Loading : /data/www/***/.env
The .env file has been loaded. See base.py for more information
Loading : /data/www/***/.env
The .env file has been loaded. See base.py for more information
Traceback (most recent call last):
  File "manage.py", line 26, in <module>
    execute_from_command_line(sys.argv)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/data/www/***/venv/lib/python3.7/site-packages/django/core/management/__init__.py", line 357, in execute
    django.setup()
  File "/data/www/***/venv/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/apps/config.py", line 90, in create
    module = import_module(entry)
  File "/data/www/***/venv/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tinymce'

steps:

  1. added django-tinymce==3.3.0 to the requirements, and installed it (also tried with version 3.4.0)
  2. added this to the urls
  3. added 'tinymce', to the INSTALLED_APPS
  4. added this to the settings with my api key:
    
    TINYMCE_JS_URL = 'https://cdn.tiny.cloud/1/[MY_API_KEY]/tinymce/5/tinymce.min.js'
    TINYMCE_COMPRESSOR = False

5. run the app, and got this error:

note:
I am using these:
Django==2.2.16
wagtail==2.11.3

any help with this?
hatimmakki commented 2 years ago

now for some reason I am getting this error:

AttributeError: cffi library '_openssl' has no function, constant or global variable named '__spec__'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 26, in <module>
    execute_from_command_line(sys.argv)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
System check identified no issues (0 silenced).
    utility.execute()
  File "/data/www/***/venv/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 60, in execute
    super().execute(*args, **options)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 95, in handle
    self.run(**options)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 102, in run
    autoreload.run_with_reloader(self.inner_run, **options)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 598, in run_with_reloader
    start_django(reloader, main_func, *args, **kwargs)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 583, in start_django
    reloader.run(django_main_thread)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 301, in run
    self.run_loop()
  File "/data/www/***/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 307, in run_loop
    next(ticker)
  File "/data/www/***/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 347, in tick
    for filepath, mtime in self.snapshot_files():
  File "/data/www/***/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 363, in snapshot_files
    for file in self.watched_files():
  File "/data/www/***/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 262, in watched_files
    yield from iter_all_python_module_files()
  File "/data/www/***/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 103, in iter_all_python_module_files
    return iter_modules_and_files(modules, frozenset(_error_files))
  File "/data/www/***/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 124, in iter_modules_and_files
    if getattr(module, '__spec__', None) is None:
SystemError: <built-in function getattr> returned a result with an error set
claudep commented 2 years ago

Sorry for you, but I think you'd rather search for help in the general Django support channels, unless you can show that django-tinymce is at fault.