Comments (11)
I have seen this error before:
ImportError: cannot import name DataRequired
And I fixed it by running pip install --upgrade Flask-WTF
. I'm not sure why that's not working for you.
A little googling makes me suspect that you have an older version of pip
and/or distribute
installed?
from digits.
I think I have the latest versions of packages. Here are some diagnostics:
$ apt-cache policy python-pip
python-pip:
Installed: 1.5.4-1
Candidate: 1.5.4-1
Version table:
*** 1.5.4-1 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
100 /var/lib/dpkg/status
and
$ apt-cache policy python-setuptools
python-setuptools:
Installed: 3.3-1ubuntu1
Candidate: 3.3-1ubuntu1
Version table:
*** 3.3-1ubuntu1 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
but I am not sure why flast-wtf latest version is 0.6 not 0.11? (I have the latest apt-get update)
$ apt-cache policy python-flaskext.wtf
python-flaskext.wtf:
Installed: 0.6-1
Candidate: 0.6-1
Version table:
*** 0.6-1 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
100 /var/lib/dpkg/status
Thanks,
from digits.
I'm running a virtualenv on my machine, which allows me to "overwrite" the system level package (v0.6) with the latest (v0.11) in my local directory. If you whack your package that was installed with apt-get, pip should be able to do its thing. Try this:
sudo apt-get purge python-flaskext.wtf
pip install --upgrade Flask-WTF
For reference, here are the versions that come with apt-get:
% pip list | grep -i wtf
Flask-WTF (0.6)
WTForms (1.0.1)
And here is what pip gives me:
% pip list | grep -i wtf
Flask-WTF (0.11)
WTForms (2.0.2)
from digits.
I purged the existing flaskext.wtf package and
$sudo pip install --upgrade Flask-WTF
Downloading/unpacking Flask-WTF
Downloading Flask_WTF-0.11-py2.py3-none-any.whl
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1259, in prepare_files
)[0]
IndexError: list index out of range
Storing debug log for failure in /tmp/tmpte0BRy
flask-wtf is not installed/upgraded for some reason.. now my pip gives me:
pip list | grep -i wtf
wtf (0.1)
WTForms (1.0.1)
from digits.
Have you tried this?
from digits.
This is it. Updating pip and distribute solved the problem. Thank you lukeyeager.
from digits.
on one of my machines, I'm getting the following error while running ./digits-devserver. I thought this might be related to this post. Any idea how to fix it?
Traceback (most recent call last):
File "./digits-devserver", line 31, in
from digits import config
File "/media/data/common/digits4/digits/config/init.py", line 7, in
from .current_config import config_value
File "/media/data/common/digits4/digits/config/current_config.py", line 4, in
from .caffe_option import CaffeOption
File "/media/data/common/digits4/digits/config/caffe_option.py", line 14, in
from digits.utils import parse_version
File "/media/data/common/digits4/digits/utils/init.py", line 158, in
from . import constants, image, time_filters, errors, forms, routing, auth
File "/media/data/common/digits4/digits/utils/forms.py", line 8, in
from wtforms.compat import string_types
ImportError: No module named compat
Here is the version of Flask and wtforms that I have installed.
Flask-WTF (0.12)
WTForms (2.1)
Thanks
from digits.
It is strange, the compat
module has been in WTForms
for a long time. Is it possible that you have several versions of WTForms
on your system? Maybe check the contents of the wtforms
package in your Python site-packages
...
from digits.
this is all the files I have in dist-packages for wtforms. And I believe this is the only version I have installed.
compat.py ext form.pyc init.py meta.py utils.pyc widgets
compat.pyc fields i18n.py init.pyc meta.pyc validators.py
csrf form.py i18n.pyc locale utils.py validators.pyc
from digits.
Try this just to be sure:
$ python -c 'import wtforms;print wtforms.__file__;print wtforms.__version__'
/usr/lib/python2.7/dist-packages/wtforms/__init__.pyc
2.1
from digits.
Your guess was right. I had two versions on the wtforms. One in "/usr/local/lib/python2.7/dist-packages" and one in "/usr/lib/python2.7/dist-packages". Pip installed the 2.1 version under /usr/local/lib while python was using the version 1.0.1 for /usr/lib/.
I had to purge the old one and the problem is solved now. Thanks
from digits.
Related Issues (20)
- How to upload pretrained model with digits:20.03-tensorflow-py3
- Isn't the dataset parallelized?
- Convert YOLO Labels to KITTI Labels
- AWS DIGITS: ERROR: ValueError: invalid literal for int() with base 10
- Failed to build Caffe on Xavier NX
- KITTI Data Trains in TF but not in Digits
- DIGITS OBJECT DETECT DATASET TRAINING ERROR HOT 1
- map validation
- How to change digits default gpu number '0'?
- DIGITS 6 docker - Can't train MNIST demo
- Nvidia A100 & Caffe Container HOT 1
- where to download Digit 21.2 ?
- Building Caffe with CUDA
- Detectnet, Multiple class object detection with an imbalanced dataset, Poor results (mAP) for one class
- Module Creation erros
- cannot see detectnet bounding boxes using Caffe model on Nano
- Is there a way to backup the entire database? HOT 1
- I'm confused between which version of DIGITS to install
- Inference HOT 7
- DIGITS DOCKET CONTAINER INSTALLING SUNNY PLUGIN HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from digits.