I did pip install whoosh, why am I getting this error?
my code can be found here:
https://stackoverflow.com/questions/34520966/haystack-exceptions-searchbackenderror-no-fields-were-found-in-installation-st
I have found that the ImportError: No module named whoosh2 error occurs when accessing an old whoosh index with updated libraries. The error went away after regenerating the whoosh index.
Related
I am using the latest package django-datatable-view 0.9.0 in django 3.1.3 (upgrading from django 1.8.6)
When a I run manage.py run server I get the following error:
File "/mcvitty/mcvitty/customers/views.py", line 14, in <module>
from datatableview.utils import get_datatable_structure
ImportError: cannot import name 'get_datatable_structure'
Upgrading the package is not an option as I am already using the latest package. I have searched datatableview get_datatable_structure but I cannot find it. What can I do to fix the error? Thank you for your help
There's a pending PR for that package to fix things for Django 3.1. https://github.com/pivotal-energy-solutions/django-datatable-view/pull/246
You'll need to either
wait until that is merged and a new version released, or
fork the project, merge the fixes you need, bump the version, and use that patched version as a requirement (e.g. https://github.com/YOURGITHUBUSERNAMEHERE/django-datatable-view/archive/master.zip#egg=django-datatable-view)
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
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
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'm, working on Windows 8 and I receive this error when launching my python program on pycharm:
ImportError: No module named Qwt5
refered to the line: "import PyQt4.Qwt5 as Qwt"
the program always worked till today, and the IDE still suggests me Qwt5 as a module to import when pressing CTRL+SPACE, so it seems is still recognized.
I checked the Qwt5 folder and there is the __init__.py file
I use Python 2.7.9 an is correctly selected as Python Interpreter
I've already tried to remove the packages and reinstall them.
Someone can help me?
i tried this and working.sudo apt-get install python-qwt5-qt4