You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/app/apps/posts/forms.py", line 19, in save
instance.save()
File "/usr/local/lib/python3.5/site-packages/django/db/models/base.py", line 806, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python3.5/site-packages/django/db/models/base.py", line 831, in save_base
update_fields=update_fields,
File "/usr/local/lib/python3.5/site-packages/django/dispatch/dispatcher.py", line 193, in send
for receiver in self._live_receivers(sender)
File "/usr/local/lib/python3.5/site-packages/django/dispatch/dispatcher.py", line 193, in <listcomp>
for receiver in self._live_receivers(sender)
File "/usr/local/lib/python3.5/site-packages/precise_bbcode/fields.py", line 136, in process_bbcodes
parser = get_parser()
File "/usr/local/lib/python3.5/site-packages/precise_bbcode/bbcode/__init__.py", line 23, in get_parser
loader.load_parser()
File "/usr/local/lib/python3.5/site-packages/precise_bbcode/bbcode/__init__.py", line 42, in load_parser
self.init_bbcode_placeholders()
File "/usr/local/lib/python3.5/site-packages/precise_bbcode/bbcode/__init__.py", line 75, in init_bbcode_placeholders
placeholders = placeholder_pool.get_placeholders()
File "/usr/local/lib/python3.5/site-packages/precise_bbcode/placeholder_pool.py", line 73, in get_placeholders
self.discover_placeholders()
File "/usr/local/lib/python3.5/site-packages/precise_bbcode/placeholder_pool.py", line 33, in discover_placeholders
load('bbcode_placeholders')
File "/usr/local/lib/python3.5/site-packages/precise_bbcode/core/loading.py", line 37, in load
get_module(app, modname)
File "/usr/local/lib/python3.5/site-packages/precise_bbcode/core/loading.py", line 23, in get_module
imp.find_module(modname, app_path)
File "/usr/local/lib/python3.5/imp.py", line 270, in find_module
"not {}".format(type(path)))
RuntimeError: 'path' must be None or a list, not <class '_frozen_importlib_external._NamespacePath'>
I use Python 3.5 and Django 1.11. I followed the docs (nothing complicated):
content=BBCodeTextField(verbose_name='content')
But in my tests when I send a POST:
post_data= {
'title': 'Test title with ł',
'categories': [category.pkforcategoryincategories],
'tags': tags,
'content': 'Hello world!',
}
response=self.client.post(self.url, post_data)
I get above error. The only custom thing is in my form:
ipdb> from precise_bbcode.bbcode import get_parser
ipdb> parser = get_parser()
*** RuntimeError: 'path' must be None or a list, not <class '_frozen_importlib_external._NamespacePath'>
I'm able to reproduce that error. The reason why it fails is that 1 of my apps didn't have __init__.py file but was included in INSTALLED_APPS.
What is the desired behaviour? Should That skip (try: except:) invalid apps or fail?
I could create a PR with the "skipping" part if this is how it should be.
Well, if I understand correctly, the main problem seems to be that one of your apps didn't have an __init__.py file. But it should have one, right? In that case, I don't see why there should be a special case implemented in django-precise-bbcode. 😉
I get this:
I use
Python 3.5
andDjango 1.11
. I followed the docs (nothing complicated):But in my tests when I send a POST:
I get above error. The only custom thing is in my form:
Any idea what that can be?
The text was updated successfully, but these errors were encountered: