Open gauravsaini793 opened 7 years ago
To start: please use python 3.4 instead of 2!
thanks for reply sir but i tried python3 and still get that same error can you please walk-through my code at team viewer i shall be thankful to you
(fenv) gaurav@gaurav-HP-Notebook:~/falconor$ python3 run.py /usr/local/lib/python3.5/dist-packages/flask_sqlalchemy/init.py:30: ExtDeprecationWarning: Importing flask.ext.sqlalchemy is deprecated, use flask_sqlalchemy instead. from flask.ext.sqlalchemy._compat import iteritems, itervalues, xrange, \ Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 144, in read_nonblocking s = os.read(self.child_fd, size) OSError: [Errno 5] Input/output error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 97, in expect_loop incoming = spawn.read_nonblocking(spawn.maxread, timeout) File "/usr/lib/python3/dist-packages/pexpect/pty_spawn.py", line 455, in read_nonblocking return super(spawn, self).read_nonblocking(size) File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 149, in read_nonblocking raise EOF('End Of File (EOF). Exception style platform.') pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run.py", line 3, in
I have the impression that there is something wrong with the behavior of your Stanford POStagger. Have you successfully downloaded the stanford-postagger-withModel.jar and english-left3words-distsim.tagger to the AQUSA folder?
Can you provide some more information on your system configuration and copy paste the python packages installed on your system?
sir, can you please send me the download link of these files " stanford-postagger-withModel.jar and english-left3words-distsim.tagger" because i am not getting exactly these files from their official sites
Please take a look at the instructions here
https://nlp.stanford.edu/software/tagger.shtml https://nlp.stanford.edu/software/pos-tagger-faq.shtml#d
Initialized StanfordTagger
creating catalog 'app/translations/en/LC_MESSAGES/messages.po' based on 'messages.pot'
compiling catalog 'app/translations/en/LC_MESSAGES/messages.po' to 'app/translations/en/LC_MESSAGES/messages.mo'
Traceback (most recent call last):
File "./manage.py", line 25, in
i have got this problem sir, how to resolve....
Are you sure you've installed all the required libraries in https://github.com/gglucass/AQUSA/blob/master/requirements.txt ?
yes all libraries have been installed ..
Can you copy paste the output of pip list
?
pip install -r requirements.txt Requirement already satisfied (use --upgrade to upgrade): alembic==0.7.5.post2 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 1)) Requirement already satisfied (use --upgrade to upgrade): aniso8601==0.92 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 2)) Requirement already satisfied (use --upgrade to upgrade): Babel==1.3 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 3)) Requirement already satisfied (use --upgrade to upgrade): decorator==3.4.2 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 4)) Requirement already satisfied (use --upgrade to upgrade): Flask==0.10.1 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 5)) Requirement already satisfied (use --upgrade to upgrade): Flask-Babel==0.9 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 6)) Requirement already satisfied (use --upgrade to upgrade): Flask-Bootstrap==3.3.2.1 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 7)) Requirement already satisfied (use --upgrade to upgrade): Flask-Login==0.2.11 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 8)) Requirement already satisfied (use --upgrade to upgrade): Flask-Migrate==1.3.1 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 9)) Requirement already satisfied (use --upgrade to upgrade): Flask-RESTful==0.3.2 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 10)) Requirement already satisfied (use --upgrade to upgrade): Flask-Script==2.0.5 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 11)) Requirement already satisfied (use --upgrade to upgrade): Flask-SQLAlchemy==2.0 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 12)) Requirement already satisfied (use --upgrade to upgrade): gunicorn==19.3.0 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 13)) Requirement already satisfied (use --upgrade to upgrade): itsdangerous==0.24 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 14)) Requirement already satisfied (use --upgrade to upgrade): Jinja2==2.7.3 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 15)) Requirement already satisfied (use --upgrade to upgrade): jsonrpc==1.2 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 16)) Requirement already satisfied (use --upgrade to upgrade): Mako==1.0.1 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 17)) Requirement already satisfied (use --upgrade to upgrade): MarkupSafe==0.23 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 18)) Requirement already satisfied (use --upgrade to upgrade): nltk==3.0.2 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 19)) Requirement already satisfied (use --upgrade to upgrade): nose==1.3.6 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 20)) Requirement already satisfied (use --upgrade to upgrade): numpy==1.9.2 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 21)) Requirement already satisfied (use --upgrade to upgrade): pandas==0.16.0 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 22)) Requirement already satisfied (use --upgrade to upgrade): pbr==0.10.8 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 23)) Requirement already satisfied (use --upgrade to upgrade): pep8==1.6.2 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 24)) Requirement already satisfied (use --upgrade to upgrade): pexpect==3.3 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 25)) Requirement already satisfied (use --upgrade to upgrade): Pillow==2.7.0 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 26)) Requirement already satisfied (use --upgrade to upgrade): psycopg2==2.6 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 27)) Requirement already satisfied (use --upgrade to upgrade): python-dateutil==2.4.1 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 28)) Requirement already satisfied (use --upgrade to upgrade): pytz==2015.2 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 29)) Requirement already satisfied (use --upgrade to upgrade): requests==2.7.0 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 30)) Requirement already satisfied (use --upgrade to upgrade): six==1.9.0 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 31)) Requirement already satisfied (use --upgrade to upgrade): speaklater==1.3 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 32)) Requirement already satisfied (use --upgrade to upgrade): SQLAlchemy==0.9.9 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 33)) Requirement already satisfied (use --upgrade to upgrade): sqlalchemy-migrate==0.9.5 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 34)) Requirement already satisfied (use --upgrade to upgrade): sqlparse==0.1.14 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 35)) Requirement already satisfied (use --upgrade to upgrade): Tempita==0.5.2 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 36)) Requirement already satisfied (use --upgrade to upgrade): Unidecode==0.4.17 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 37)) Requirement already satisfied (use --upgrade to upgrade): Werkzeug==0.10.4 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 38)) Requirement already satisfied (use --upgrade to upgrade): uwsgi==2.0.11.2 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 39)) Requirement already satisfied (use --upgrade to upgrade): Flask-MySQLdb==0.2.0 in ./venv1/lib/python3.4/site-packages (from -r requirements.txt (line 40)) Requirement already satisfied (use --upgrade to upgrade): mysqlclient in ./venv1/lib/python3.4/site-packages (from Flask-MySQLdb==0.2.0->-r requirements.txt (line 40)) Cleaning up...
Did you install a database and correctly configure the DATABASE_URI in https://github.com/gglucass/AQUSA/blob/master/app/__init__.py ?
i guess you are correct...
import os from flask import Flask from flask_bootstrap import Bootstrap from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.babel import Babel
app = Flask(name) app.config.from_pyfile('../config.py') Bootstrap(app) app.config['SQLALCHEMY_DATABASE_URI'] = os.environ["postgresql://localhost/story"] db = SQLAlchemy(app) babel = Babel(app)
from app import views, models
how to correctly configure the database?
if i export the database export DATABASE_URL="postgresql://localhost/story" Then the error is same as previously i mentioned.
But if i give it as, app.config['SQLALCHEMY_DATABASE_URI'] = os.environ["postgresql://localhost/story"] in the init.py then
./manage.py db migrate
Traceback (most recent call last):
File "./manage.py", line 10, in
Please add username and password correctly in your database_url and check whether the server is running correctly.
For example: postgresql://user:password@localhost/story
Do not change the value of os.environ[]
. That is a call to the environment variable DATABASE_URL. Export database_url correctly and it should work.
Would you plz get me some link or steps of postgresql database creation and configuring it in our application...... as i am not able to figure out the problem where it is lacking.
Database story which is to be used is empty?? and how are we inserting data into it as its structure is being defined by models.py
Postgresql + Flask tutorial: http://flask-sqlalchemy.pocoo.org/2.1/quickstart/
If you removed the migrations, you probably need those to configure the db.
sir, i am getting this error,
db.create_all()
Traceback (most recent call last):
File "
for the given url; export DATABASE_URL="postgresql://postgres:pinkashia/localhost/storiesfinal"
Please use "postgresql://postgres:pinkashia@localhost/storiesfinal"
yes i made i mistake there, after correcting that still these errors are coming.
db.create_all() Traceback (most recent call last): File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/pool.py", line 951, in _do_get return self._pool.get(wait, self._timeout) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/util/queue.py", line 145, in get raise Empty sqlalchemy.util.queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/engine/strategies.py", line 90, in connect return dialect.connect(*cargs, *cparams) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/engine/default.py", line 377, in connect return self.dbapi.connect(cargs, **cparams) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/psycopg2/init.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) psycopg2.OperationalError: could not translate host name "locahost" to address: Name or service not known
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "
Seriously, please learn to read what your computer tells you. Clearly there's an error with locahost
vs. localhost
.
If you cannot solve these simple problems yourself, you will never be able to run this software.
/home/gaurav/falconor/fenv/local/lib/python2.7/site-packages/flask_sqlalchemy/init.py:839: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning. 'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and ' Traceback (most recent call last): File "./manage.py", line 8, in
from app import app, models, analyzers, db
File "/home/gaurav/falconor/app/init.py", line 14, in
from app import views, models
File "/home/gaurav/falconor/app/views.py", line 5, in
from .models import Stories, Projects, Defects
File "/home/gaurav/falconor/app/models.py", line 5, in
AQUSATagger = StanfordTagger()
File "/home/gaurav/falconor/app/taggers.py", line 11, in init
self.pos_tagger.expect('done', timeout=20)
File "/home/gaurav/falconor/fenv/local/lib/python2.7/site-packages/pexpect/init.py", line 1451, in expect
timeout, searchwindowsize)
File "/home/gaurav/falconor/fenv/local/lib/python2.7/site-packages/pexpect/init.py", line 1466, in expect_list
timeout, searchwindowsize)
File "/home/gaurav/falconor/fenv/local/lib/python2.7/site-packages/pexpect/init.py", line 1554, in expect_loop
raise EOF(str(err) + '\n' + str(self))
pexpect.EOF: End Of File (EOF). Exception style platform.
<pexpect.spawn object at 0xb65a08ec>
version: 3.3
command: /usr/bin/java
args: ['/usr/bin/java', '-mx300m', '-cp', 'stanford/stanford-postagger-withModel.jar', 'edu.stanford.nlp.tagger.maxent.MaxentTagger', '-model', 'stanford/english-left3words-distsim.tagger']
searcher: <pexpect.searcher_re object at 0xb57c6e8c>
buffer (last 100 chars): ''
before (last 100 chars): 'Error: Could not find or load main class edu.stanford.nlp.tagger.maxent.MaxentTagger\r\n'
after: <class 'pexpect.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 3003
child_fd: 6
closed: False
timeout: 30
delimiter: <class 'pexpect.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
got this problem so many time tell me sir what to do