Module 'html5lib.filters.sanitizer' has no attribute 'allowed_elements' - django-cms

I am not able to add any content in the page it is throwing the error
AttributeError at /en/admin/cms/page/add-plugin/
module 'html5lib.filters.sanitizer' has no attribute 'allowed_elements'

Go to your virtualenv and install html5lib in version 0.999999999
pip install html5lib==0.999999999
For me works fine :)

Related

How to use Heroicons v2 in headlessui

Hi i try use Heroicons in Headlessui but I encountered this errorŲŒhow can i fix that?
Uncaught Error: You're trying to import #heroicons/react/solid/SelectorIcon from Heroicons v1 but have installed Heroicons v2. Install #heroicons/react#v1 to resolve this error.
Update: There are two ways to fix the error:
install #heroicons/react#v1:
npm i #heroicons/react#v1
Use react-icons instead of heroicons:
npm i react-icons

module not found error whle using librosa keyword

Exception has occurred: ModuleNotFoundError
No module named 'numba.decorators'
File "C:\Users\prasa\OneDrive\Desktop\Python\Untitled-1.py", line 3, in
import librosa
Install a previous version of numba since the newest versions deleted the decorators module.
you can use pip install numba==0.48

Apache Airflow 1.9 install on debian 8 from GitHub

I installed Apache airflow 1.9 from GitHub thanks to this command line on debian 9: pip install git+https://github.com/apache/incubator-airflow.git#v1-9-stable
However, I have an error during the airflow initdb caused by Fernet, do you know how to solve this issue?
INFO [alembic.runtime.migration] Running upgrade 947454bf1dff -> d2ae31099d61, Increase text size for MySQL (not relevant for other DBs' text types)
[2017-12-27 17:19:24,586] {models.py:643} ERROR - Failed to load fernet while encrypting value, using non-encrypted value.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 639, in set_extra
fernet = get_fernet()
File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 103, in get_fernet
raise AirflowException('Failed to import Fernet, it may not be installed')
AirflowException: Failed to import Fernet, it may not be installed
[2017-12-27 17:19:24,601] {models.py:643} ERROR - Failed to load fernet
And how can I specify extrapackage like in pip install apache-airflow[gcp-api] from my previous pip command install with GitHub?
How to install the latest 1.9.0RC too? I have an assertionError.
The answer marked as good have a broken link, if you have landed here as me and it continues broken, these steps have worked for me:
pip install cryptography
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
Add the generated key to the config file airflow.cfg, fernet_key = YOUR_GENERATED_KEY
During install from source you have to replace fernet_key in airflow.cfg such as you can find in the docs here.
In apache-airflow documentation, the script for generating fernet key is apparently wrong.
it says to use the following script.
from cryptography.fernet import Fernet
fernet_key= Fernet.generate_key()
print(fernet_key) # your fernet_key, keep it in secured place!
but it raises an exception at 'airflow initdb' command.
to solve this instead of Fernet.generate_key() use Fernet.generate_key().decode() as shown in #skozz answer.

Serf 1.3.8 install using scons is failing

I am using Redhat 6.6 and installed scons and using scons to install serf 1.3.8 but seeing the below error. Anyone has faced the below error. I am stuck and i need serf for http/https access for svn 1.9. Seeking advice for below error. I followed below URL. "http://www.linuxfromscratch.org" site for install procedure. I see error while executing cmd "/local//scons-2.4.1/script/scons check"
Has anyone know the solution or alternative to install serf to bypass this option and install serf without no issues
scons: Building targets ... test/test_buckets.c: In function
'test_deflate_4GBplus_buckets': test/test_buckets.c:1559: warning: integer
overflow in expression scons: *** [test/test_buckets.o] Error 1 scons: building
terminated because of errors.
Please advice.
[EDIT]
What env variables are required for scons to work properly. I see different error, i messed the environment. Seeing the below error. Any idea what I have missed. I have the custom install for python7. I have added the python install path to PATH,LD_LIBRARY_PATH. Error is below. Import failed. Unable to find SCons files in: /local/appln/pkgs/scons-2.4.1/bin/../engine /local/appln/pkgs/scons-2.4.1/bin/scons-local-2.4.1 /local/appln/pkgs/scons-2.4.1/bin/scons-local /usr/lib/scons-2.4.1 /usr/local/lib/scons-2.4.1 /local/apps/pkgs/scons-2.4.1/lib/python2.6/site-packages/scons-2.4.1 /usr/lib/python2.6/site-packages/scons-2.4.1 /usr/local/lib/python2.6/site-packages/scons-2.4.1 /usr/lib64/scons-2.4.1 /local/apps/pkgs/scons-2.4.1/lib/scons /usr/lib/scons /usr/local/lib/scons /local/appln/pkgs/scons-2.4.1/lib/python2.6/site-packages/scons /usr/lib/python2.6/site-packages/scons
/usr/local/lib/python2.6/site-packages/scons /usr/lib64/scons
Traceback (most recent call last): File "/local/appln/pkgs/scons-2.4.1/bin/scons", line 190, in import SCons.Script
ImportError: No module named SCons.Script
[Closed]

stange error with Behat and Mink on Sf2

I'm using Behat,mink in my Symfony2 project,so I follow those tutorials to make installation :
http://extensions.behat.org/symfony2/ , http://extensions.behat.org/symfony2/migrating_from_2.3_to_2.4.html
but when I run this command php behat.phar --init "#YouBundleName",I get this very strange error :
PHP Warning: require(Behat\MinkExtension\Extension): failed to open stream: No such file or directory in phar:///var/www/project/behat.phar/src/Behat/Behat /Extension/ExtensionManager.php on line 112
PHP Fatal error: require(): Failed opening required 'Behat\MinkExtension\Extension' (include_path='.:/usr/share/php:/usr/share/pear') in phar:///var/www/project/behat.phar/src/Behat/Behat/Extension/ExtensionManager.php on line 112
I'm sure I installed the last version of behat and mink mentionned in the second link above and then I made php composer.phar unpdate and cache clear too,but still the same error?
I had the same problem. Forgot you need to install behat/mink-extension as well as behat/mink. For example you might need to run:
php composer.phar require behat/mink-extension:*
Worked for me.
By the way, looks like you got confused by the two installation methods, phar vs composer. I'd go with the composer route because it's easier to update and manage versions. This would mean running php bin/behat ... instead of php behat.phar ....

Resources