[MSNoise] Stack_error

Thomas Lecocq Thomas.Lecocq at seismology.be
Wed Apr 4 15:15:04 UTC 2018


Hi,

I assume your other errors are solved, that's good news.

For MySQL, did you restart the mysql or mysqld service after adapting 
my.cnf ?

Best regards,

Thomas


On 04/04/2018 15:37, Yawar Hussain wrote:
> Hello,
>
> I run stack command and received following errors.
> Please, have a look.
> I tried to fix it by editing 'my.cnf' file as below
>
>   The MySQL database server configuration file.
> #
> # You can copy this to one of:
> # - "/etc/mysql/my.cnf" to set global options,
> # - "~/.my.cnf" to set user-specific options.
> #
> # One can use all long options that the program supports.
> # Run program with --help to get a list of available options and with
> # --print-defaults to see which it would actually understand and use.
> #
> # For explanations see
> # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
>
> #
> # * IMPORTANT: Additional settings that can override those from this file!
> #   The files must end with '.cnf', otherwise they'll be ignored.
> #
>
>
> !includedir /etc/mysql/conf.d/
> !includedir /etc/mysql/mysql.conf.d/
> [global]
> sql_mode = TRADITIONAL
>
>
>
> Stack error!
>
>
> yawar at yawar-Vostro-5470:~/anaconda3/bin$ msnoise stack -r -m -i 10
> Lets STACK !
> 2018-04-03 10:59:04 [DEBUG] Starting the ref stack
> []
> 2018-04-03 10:59:04 [DEBUG] Processing DF01_BHE:DF01_BHE-ZZ-1
> Traceback (most recent call last):
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
> line 1139, in _execute_context
>      context)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/engine/default.py",
> line 450, in do_execute
>      cursor.execute(statement, parameters)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/cursors.py",
> line 166, in execute
>      result = self._query(query)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/cursors.py",
> line 322, in _query
>      conn.query(q)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/connections.py",
> line 835, in query
>      self._affected_rows = self._read_query_result(unbuffered=unbuffered)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/connections.py",
> line 1019, in _read_query_result
>      result.read()
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/connections.py",
> line 1302, in read
>      first_packet = self.connection._read_packet()
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/connections.py",
> line 981, in _read_packet
>      packet.check_error()
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/connections.py",
> line 393, in check_error
>      err.raise_mysql_exception(self._data)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/err.py",
> line 107, in raise_mysql_exception
>      raise errorclass(errno, errval)
> pymysql.err.InternalError: (1055, "Expression #1 of SELECT list is not in
> GROUP BY clause and contains nonaggregated column 'msnoise.jobs.ref' which
> is not functionally dependent on columns in GROUP BY clause; this is
> incompatible with sql_mode=only_full_group_by")
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
>    File "/home/yawar/anaconda3/bin/msnoise", line 11, in <module>
>      sys.exit(run())
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/msnoise/scripts/msnoise.py",
> line 614, in run
>      cli(obj={})
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/click/core.py",
> line 716, in __call__
>      return self.main(*args, **kwargs)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/click/core.py",
> line 696, in main
>      rv = self.invoke(ctx)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/click/core.py",
> line 1060, in invoke
>      return _process_result(sub_ctx.command.invoke(sub_ctx))
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/click/core.py",
> line 889, in invoke
>      return ctx.invoke(self.callback, **ctx.params)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/click/core.py",
> line 534, in invoke
>      return callback(*args, **kwargs)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/msnoise/scripts/msnoise.py",
> line 301, in stack
>      main('ref', interval)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/msnoise/s04stack.py",
> line 203, in main
>      updated_days = updated_days_for_dates(db, start, end, pair.replace('_',
> '.'), jobtype='CC', interval=datetime.timedelta(days=interval),returndays=
> True)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/msnoise/api.py",
> line 1189, in updated_days_for_dates
>      days = session.query(Job).filter(Job.pair == pair).filter(Job.day >=
> date1).filter(Job.day <= date2).filter(Job.jobtype ==
> jobtype).filter(Job.lastmod >= lastmod).group_by(Job.day).
> order_by(Job.day).all()
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/orm/query.py",
> line 2613, in all
>      return list(self)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/orm/query.py",
> line 2761, in __iter__
>      return self._execute_and_instances(context)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/orm/query.py",
> line 2776, in _execute_and_instances
>      result = conn.execute(querycontext.statement, self._params)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
> line 914, in execute
>      return meth(self, multiparams, params)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/sql/elements.py",
> line 323, in _execute_on_connection
>      return connection._execute_clauseelement(self, multiparams, params)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
> line 1010, in _execute_clauseelement
>      compiled_sql, distilled_params
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
> line 1146, in _execute_context
>      context)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
> line 1341, in _handle_dbapi_exception
>      exc_info
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/util/compat.py",
> line 202, in raise_from_cause
>      reraise(type(exception), exception, tb=exc_tb, cause=cause)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/util/compat.py",
> line 185, in reraise
>      raise value.with_traceback(tb)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
> line 1139, in _execute_context
>      context)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/sqlalchemy/engine/default.py",
> line 450, in do_execute
>      cursor.execute(statement, parameters)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/cursors.py",
> line 166, in execute
>      result = self._query(query)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/cursors.py",
> line 322, in _query
>      conn.query(q)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/connections.py",
> line 835, in query
>      self._affected_rows = self._read_query_result(unbuffered=unbuffered)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/connections.py",
> line 1019, in _read_query_result
>      result.read()
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/connections.py",
> line 1302, in read
>      first_packet = self.connection._read_packet()
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/connections.py",
> line 981, in _read_packet
>      packet.check_error()
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/connections.py",
> line 393, in check_error
>      err.raise_mysql_exception(self._data)
>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/pymysql/err.py",
> line 107, in raise_mysql_exception
>      raise errorclass(errno, errval)
> sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1055,
> "Expression #1 of SELECT list is not in GROUP BY clause and contains
> nonaggregated column 'msnoise.jobs.ref' which is not functionally dependent
> on columns in GROUP BY clause; this is incompatible with
> sql_mode=only_full_group_by") [SQL: 'SELECT jobs.ref AS jobs_ref, jobs.day
> AS jobs_day, jobs.pair AS jobs_pair, jobs.jobtype AS jobs_jobtype,
> jobs.flag AS jobs_flag, jobs.lastmod AS jobs_lastmod \nFROM jobs \nWHERE
> jobs.pair = %(pair_1)s AND jobs.day >= %(day_1)s AND jobs.day <= %(day_2)s
> AND jobs.jobtype = %(jobtype_1)s AND jobs.lastmod >= %(lastmod_1)s GROUP BY
> jobs.day ORDER BY jobs.day'] [parameters: {'lastmod_1':
> datetime.datetime(2018, 3, 24, 10, 59, 4, 395159), 'jobtype_1': 'CC',
> 'day_2': datetime.date(2018, 1, 1), 'pair_1': 'DF01.BHE:DF01.BHE', 'day_1':
> datetime.date(1970, 1, 1)}]
>
>
> Regards,
> Yawar Hussain
> Ph.D. Student, Geotechnical Engineering
> University of Brasilia, Brazil.
> _______________________________________________
> MSNoise mailing list
> MSNoise at mailman-as.oma.be
> http://mailman-as.oma.be/mailman/listinfo/msnoise

-- 
Dr. Thomas Lecocq
Geologist - Seismologist

Seismology - Gravimetry
Royal Observatory of Belgium

            *
        * * * * *
         * * * *
        ---------
http://www.seismology.be
http://msnoise.org
http://twitter.com/#!/Seismologie_be
https://www.facebook.com/seismologie.be



More information about the MSNoise mailing list