#A very weird problem

1 messages · Page 1 of 1 (latest)

green moss
#

I just pip a package 'ckeditor' . It contains two site-package 'ckeditor' and 'js_asset'. But somehow, the in the 'js_asset' init.py file

import contextlib

with contextlib.suppress(ImportError):
from js_asset.js import * # noqa: F403

It shows js_asset coundn't be found....

Then I start a django project and pip 'ckeditor'. And it works perfectly. I have no idea how it happen and how to fix it.

green moss
#

pip show django-js-asset
Name: django-js-asset
Version: 2.2.0
Summary: script tag with additional attributes for django.forms.Media
Home-page:
Author:
Author-email: Matthias Kestenholz [email protected]
License: BSD-3-Clause
Location: d:\travel_app\vir_env\lib\site-packages
Requires: django
Required-by: django-ckeditor

This is for the django-js-asset infor. it's installed correctly.

#js_asset/init.py
version = "2.2.0"

import contextlib

with contextlib.suppress(ImportError):
from js_asset.js import * # It shows wrong in this line with 'js_asset'. I have no idea why

kindred frost
#

Speaking as the maintainer and author, I'm not sure what went wrong here.

#

Just saying, using CKEditor 4 is maybe not the best idea, since it's only maintained as a paid LTS package and only until 2024...

#

Maybe the problem is that there's no explicit dependency upon Django itself, and the import error hides the fact that Django itself wasn't installed?