The error:
My packages:
The error message says that I don't have this model. However I could successfully install it using pip and pip freeze shows it.
What is wrong with my install/script?
The version of Markupsafe is problematic.
I downgraded to Markupsafe==1.1.1 (because I had 2.0.1) and I don't have the problem anymore.
The module is called markupsafe._compat. See it at
https://github.com/pallets/markupsafe/tree/master/markupsafe in file _compat.py. You have a problem in your code, probably copy/paste error.
I solved the problem. Reinstalling Jinja helped
Related
I have been getting this error anytime i run my project with (runserver_plus --cert-file cert.crt)...I already installed the django extensions and pyOpenSSL
I tried running without the (--cert-file cert.crt), that one seems to work fine buh doesnt provide me with what I am looking for .
You can try to downgrade the cryptography lib:
pip install --force-reinstall "cryptography==38.0.4"
Seems to be a temporary bug, fixed, but pending to release: https://github.com/aws/aws-sam-cli/issues/4527#issuecomment-1368871248
Currently I have migrated my python2 django project to python 3 & after conversion to py3 I am getting below kind of error for below code.
from hubarcode.code128 import Code128Encoder
encoder = Code128Encoder(pur_num, {'is_reliable': False})
Trackeback is as below.
from hubarcode.code128 import Code128Encoder
File "D:\my_project\venv\lib\site-packages\hubarcode\code128__init__.py", line 16, in
from textencoder import TextEncoder
ModuleNotFoundError: No module named 'textencoder'
I have tried to search for solution online on google but not able to solve it.
Any suggestions ?
Thanks.
I am able to solve issue by using pyStrich.
First you need to install pyStrich using pip3 install pyStrich and after thatn
What you need to do is just replace from hubarcode.code128 import Code128Encoder with
from pystrich.code128 import Code128Encoder.
I hope it may help others who have been facing same kind of problem.
pip freeze will show it if you have this module installed in your venv
pip install textencoder to resolve problem
I am trying to import win32api in python 2.7.9. i did the "pip install pypiwin32" and made sure all the files were intalled correctly (i have the win32api.pyd under ${PYTHON_HOME}\Lib\site-packages\win32). i also tried coping the files from C:\Python27\Lib\site-packages\pywin32_system32 to C:\Python27\Lib\site-packages\win32. I also tried restarting my pc after each of these steps but nothing seems to work! i still get the error 'No module named 'win32api''
Well, turns out the answer is upgrading my python to 3.6.
python 2.7 seems to old to work with outside imports (I'm just guessing here, because its not the first time I'm having an import problem)
hope it helps :)
I'm using for the first time eve-swagger and I tried to execute the example provided in the README.rst file with the error message:
ImportError: cannot import name add_documentation
I tried to grep add_documentation in the repository and seems to be not defined.
Is this function defined in other version of eve-swagger?
How can I update elements in the documentation at run-time?
Many thanks in advance for your help!
add_documentation is on 0.0.5 which is still in development (changelog). If you installed from PyPI (pip install eve-swagger) then you are on v0.0.4, which has no add_documentation available.
Either you wait for 0.0.5 to go live, or you install the development version, which you can do with:
pip install git+https://github.com/nicolaiarocci/eve-swagger
I just installed mvpa2 module on my ubuntu 14.04, Python 2.7.6. following the instruction at http://www.pymvpa.org/installation.html using sudo aptitude install python-mvpa2
Command import mvpa2 works well, but when I run from mvpa2.suite import * , I get the followin warning in my terminal:
/usr/local/lib/python2.7/dist-packages/sklearn/pls.py:7: DeprecationWarning: This module has been moved to cross_decomposition and will be removed in 0.16
"removed in 0.16", DeprecationWarning)
And also fallowing error:
TypeError: __init__() got an unexpected keyword argument 'rho'
Appreciate your help!
actually this warning comes from the import done by mdp, which PyMVPA optionally uses... you can safely ignore it (no upgrade of PyMVPA would help anyhow), because even if it gets completely removed, then mdp would simply skip that import and you would remain 'golden'.
That problem is due to an incompatibility of the python-mvpa2 and scikit-learn versions. You can check more details on that in this page, because depends on which scikit-learn version you have what will be the parameters to call a given function.
A short solution is to uninstall your python-mvpa2 and scikit-learn, and install them directly from their github repos:
[python-mvpa2] https://github.com/PyMVPA
[scikit-learn] https://github.com/scikit-learn/scikit-learn
I just did it and now the example doc/examples/som.py (for my case) is working perfectly.