gglucass / AQUSA

A user story quality assurance tool by Utrecht University
MIT License
33 stars 14 forks source link

about stanford directory #7

Open gauravsaini793 opened 7 years ago

gauravsaini793 commented 7 years ago

/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

gglucass commented 7 years ago

To start: please use python 3.4 instead of 2!

gauravsaini793 commented 7 years ago

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

gauravsaini793 commented 7 years ago

(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 from app import app File "/home/gaurav/falconor/app/init.py", line 15, 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 "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 315, in expect timeout, searchwindowsize, async) File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 339, in expect_list return exp.expect_loop(timeout) File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 102, in expect_loop return self.eof(e) File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 49, in eof raise EOF(msg) pexpect.exceptions.EOF: End Of File (EOF). Exception style platform. <pexpect.pty_spawn.spawn object at 0xb6467f0c> 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: None buffer (last 100 chars): b'' before (last 100 chars): b'entTagger.java:1334)\r\n\tat edu.stanford.nlp.tagger.maxent.MaxentTagger.main(MaxentTagger.java:1631)\r\n' after: <class 'pexpect.exceptions.EOF'> match: None match_index: None exitstatus: None flag_eof: True pid: 9120 child_fd: 5 closed: False timeout: 30 delimiter: <class 'pexpect.exceptions.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0.1

gglucass commented 7 years ago

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?

gauravsaini793 commented 7 years ago

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

gglucass commented 7 years ago

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

Pinkashia commented 7 years ago

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 manager.run() File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/flask_script/init.py", line 412, in run result = self.handle(sys.argv[0], sys.argv[1:]) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/flask_script/init.py", line 350, in handle app_parser = self.create_parser(prog) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/flask_script/init.py", line 193, in create_parser command_parser = command.create_parser(name, func_stack=func_stack, parent=self) AttributeError: 'NoneType' object has no attribute 'create_parser'

i have got this problem sir, how to resolve....

gglucass commented 7 years ago

Are you sure you've installed all the required libraries in https://github.com/gglucass/AQUSA/blob/master/requirements.txt ?

Pinkashia commented 7 years ago

yes all libraries have been installed ..

gglucass commented 7 years ago

Can you copy paste the output of pip list?

Pinkashia commented 7 years ago

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...

gglucass commented 7 years ago

Did you install a database and correctly configure the DATABASE_URI in https://github.com/gglucass/AQUSA/blob/master/app/__init__.py ?

Pinkashia commented 7 years ago

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?

Pinkashia commented 7 years ago

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 from app import app, models, analyzers, db File "/home/pinkashia/aqusanew/AQUSA/app/init.py", line 10, in app.config['SQLALCHEMY_DATABASE_URI'] = os.environ["postgresql://localhost/story"] File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/os.py", line 633, in getitem raise KeyError(key) from None KeyError: 'postgresql://localhost/story' is caused,...........

gglucass commented 7 years ago

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

gglucass commented 7 years ago

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.

Pinkashia commented 7 years ago

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

gglucass commented 7 years ago

Postgresql + Flask tutorial: http://flask-sqlalchemy.pocoo.org/2.1/quickstart/

If you removed the migrations, you probably need those to configure the db.

Pinkashia commented 7 years ago

sir, i am getting this error,

db.create_all() Traceback (most recent call last): File "", line 1, in File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/flask_sqlalchemy/init.py", line 895, in create_all self._execute_for_all_tables(app, bind, 'create_all') File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/flask_sqlalchemy/init.py", line 887, in _execute_for_all_tables op(bind=self.get_engine(app, bind), extra) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/flask_sqlalchemy/init.py", line 833, in get_engine return connector.get_engine() File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/flask_sqlalchemy/init.py", line 493, in get_engine info = make_url(uri) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/engine/url.py", line 176, in make_url return _parse_rfc1738_args(name_or_url) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/engine/url.py", line 222, in _parse_rfc1738_args return URL(name, components) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/engine/url.py", line 60, in init self.port = int(port) ValueError: invalid literal for int() with base 10: 'pinkashia'

for the given url; export DATABASE_URL="postgresql://postgres:pinkashia/localhost/storiesfinal"

gglucass commented 7 years ago

Please use "postgresql://postgres:pinkashia@localhost/storiesfinal"

Pinkashia commented 7 years ago

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 "", line 1, in File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/flask_sqlalchemy/init.py", line 895, in create_all self._execute_for_all_tables(app, bind, 'create_all') File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/flask_sqlalchemy/init.py", line 887, in _execute_for_all_tables op(bind=self.get_engine(app, bind), extra) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/sql/schema.py", line 3420, in create_all tables=tables) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/engine/base.py", line 1727, in _run_visitor with self._optional_conn_ctx_manager(connection) as conn: File "/usr/lib/python3.4/contextlib.py", line 59, in enter return next(self.gen) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/engine/base.py", line 1720, in _optional_conn_ctx_manager with self.contextual_connect() as conn: File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/engine/base.py", line 1910, in contextual_connect self.pool.connect(), File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/pool.py", line 338, in connect return _ConnectionFairy._checkout(self) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/pool.py", line 645, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/pool.py", line 440, in checkout rec = pool._do_get() File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/pool.py", line 964, in _do_get return self._create_connection() File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/pool.py", line 285, in _create_connection return _ConnectionRecord(self) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/pool.py", line 411, in init self.connection = self.connect() File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/pool.py", line 539, in connect connection = self.__pool._creator() File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/engine/strategies.py", line 96, in connect connection_invalidated=invalidated File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/util/compat.py", line 188, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=exc_value) File "/home/pinkashia/aqusanew/AQUSA/venv1/lib/python3.4/site-packages/sqlalchemy/util/compat.py", line 181, in reraise raise value.with_traceback(tb) 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) sqlalchemy.exc.OperationalError: (OperationalError) could not translate host name "locahost" to address: Name or service not known None None

gglucass commented 7 years ago

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.