MarketSquare / MarketSquare/DbBot

dbbot doesn't work in solaris

Open
#11 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
60
Forks
66
PR merge metrics
No merged PRs in 30d

Description

I'm using Solaris on x86 machine and copy DbBot-master to ~/pkgs.
The version of RF is 2.8.4 and the version of Python is 2.7.2

I go to the folder ~/pkgs/DbBot-master/bin and execute the command ./dbbot ~/yqleng_20140309_225128_output.xml (This file is generated by pybot. Please get it in the attachment.)

Then there is some error returned as below:
Traceback (most recent call last):
File "./dbbot", line 52, in
DbBot().run()
File "./dbbot", line 32, in **init**
self._db = DatabaseWriter(database_path, verbose_stream)
File "/home/users/yqleng/pkgs/DbBot-master/dbbot/reader/database_writer.py", line 21, in __init__
self._init_schema()
File "/home/users/yqleng/pkgs/DbBot-master/dbbot/reader/database_writer.py", line 25, in _init_schema
self._create_table_test_runs()
File "/home/users/yqleng/pkgs/DbBot-master/dbbot/reader/database_writer.py", line 46, in _create_table_test_runs
}, ('hash',))
File "/home/users/yqleng/pkgs/DbBot-master/dbbot/reader/database_writer.py", line 161, in _create_table
self._connection.execute(sql_statement)
sqlite3.OperationalError: disk I/O error.

Please note:
I tried the same SQL in python as below and it works:

> > > import sqlite3
> > > con=sqlite3.connect("./file.db")
> > > cur=con.cursor()
> > > cur.execute("CREATE TABLE IF NOT EXISTS test_runs (id INTEGER PRIMARY KEY, started_at DATETIME, finished_at DATETIME, source_file TEXT, hash TEXT NOT NULL, imported_at DATETIME NOT NULL, CONSTRAINT unique_test_runs UNIQUE (hash))")
> > >

I also tried in Window7 and dbbot worked well and generated the file robot_results.db.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with bin/dbbot and dbbot/reader/database_writer.py, especially _init_schema, _create_table_test_runs, and _create_table, then reproduce the command against the supplied XML on Solaris. Compare the failing database path and SQLite behavior with the standalone Python example; done means DbBot creates robot_results.db and imports the run without the disk I/O error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
databases, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.