-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: cannot import name 'TextField' from 'wtforms' #206
Comments
I observed the following when attempting to install on Ubuntu 20.04. I can connect with ATAK on TCP unencrypted 8087. Traceback (most recent call last): Mike |
I was able to correct this by editing /usr/local/lib/python3.8/dist-packages/FreeTAKServer-UI/app/base/forms.py |
Can you post your working forms.py I made the changes and the GUI starts now but I can't login. This is a new install and the default admin and password doesn't work. I did noticed that the last password line in the UpdateAccountForm was using TextField and all other lines that work with password was PasswordField... I tried it both ways and still couldn't login. I did this same install without any issues October 30 and didn't run into these issues so odd to run into this road block now ...some sort of bug has been introduced. |
Same issue on my install. Replacing "TextField" didn't solve it. When installed couple of months ago, there were no problems. |
this also workwd for me, thats part of how i got my server to run. i got the UI up, and was goi g to log in and make alterations to the settings in the UI for ease of use, but i cant actually get logged in, because my server apparently didnt install correctly, something about my pathlib. im going to edit my recent ticket and add some more info now that I'm more awake and have a vetter idea of why my UI was working but the server wasn't. now i gotta figure out the pathlib issue and why its not installing the server correctly, its also had issues i staing some tools as well. My issue #211 |
@OzInFl - any reason why on a new install of server and GUI that admin and password would not get me into the GUI? Not sure how to troubleshoot this issue to get me in and going. |
Im not sure, I am able to login with 'admin' and 'password' however now in the GUI, which looks nice, i get the 'Sorry, there seems to be an issue with the connection!' that pops up every few seconds.. still more to debug.. |
Since I have the "working install" from Oct on my other VM. Am I able to simply copy all the /disto-packages/ folders related to the IU over to my new server and would it work? |
Same issue on CentOS7, same conditions. Watching for solution. |
downgrade wtforms from 3.0 to 2.3.3. They deprecated TextField and replaced with StringField in 3.0 so the latest will break until the python files are updated to support String vs Text. As a workaround run the following to remove 3.0 and replace with 2.3.3. the UI will launch after completed. sudo pip3 install WTForms==2.3.3 |
thank you @tsvtx, this is the solution for now |
I wouldn't consider this closed just yet.... Have you updated the install back to using WTForm 2.3.3? I tied the above commend and then also changed my forms.py back to default and now UI will not start saying it can't import TextField. Should I uninstall UI and reinstall? |
That has no bearing on the version of forms you have installed. If you're still seeing it, you need to check the active version. Execute the following: 'sudo pip3 show wtforms' You should see: Name: WTForms If it still shows as 3.0, maybe your system is being ornery and needs to have it spelled out as the auto replace isn't working right... sudo pip3 uninstall wtforms |
Had the same issue even after rolling back to 2.3.3. |
That did the trick, I had to run both uninstalls sudo pip3 uninstall wtforms and sudo pip3 uninstall wtforms==2.3.3 before running the install sudo pip3 install wtforms==2.3.3 to get sudo pip3 show wtforms to show the correct v2.3.3 of wtforms. |
the correct version of wtforms is part of the requirements. However if you have a machine with higher version I would not deinstall and re-install it |
This worked for me as well. |
updated wtforms dependencies version to address issue #206
CLosed because we have updated the dependencies |
To prevent error "ImportError: cannot import name 'TextField' from 'wtforms'" More details: FreeTAKTeam/FreeTakServer#206
Fresh install of Ubunto 20.04 and I have FTS server running and ATAK can connect, but can't get UI running --> error code below. Can some assist please?
freetakserver@freetakserver:~ $ sudo python3 /usr/local/lib/python3.8/dist-packages/FreeTAKServer-UI/run.py
[sudo] password for freetakserver:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/FreeTAKServer-UI/run.py", line 57, in
app = create_app( app_config )
File "/usr/local/lib/python3.8/dist-packages/FreeTAKServer-UI/app/init.py", line 93, in create_app
register_blueprints(app)
File "/usr/local/lib/python3.8/dist-packages/FreeTAKServer-UI/app/init.py", line 25, in register_blueprints
module = import_module('app.{}.routes'.format(module_name))
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/usr/local/lib/python3.8/dist-packages/FreeTAKServer-UI/app/base/routes.py", line 17, in
from app.base.forms import LoginForm, CreateAccountForm
File "/usr/local/lib/python3.8/dist-packages/FreeTAKServer-UI/app/base/forms.py", line 8, in
from wtforms import TextField, PasswordField
ImportError: cannot import name 'TextField' from 'wtforms' (/usr/local/lib/python3.8/dist-packages/wtforms/init.py)
freetakserver@freetakserver:~$
The text was updated successfully, but these errors were encountered: