pykat issueshttps://git.ligo.org/finesse/pykat/-/issues2020-10-13T01:33:49Zhttps://git.ligo.org/finesse/pykat/-/issues/17Conda PyKat Install Does not Correctly Parse Finesse Version2020-10-13T01:33:49ZAaron JonesConda PyKat Install Does not Correctly Parse Finesse VersionSteps to reproduce
```bash
conda env create --name conda_pykat python=3.8
conda activate conda_pykat
conda install -c gwoptics pykat
python -c "import pykat"
```
Returns
```
(conda_pykat) AaronJoness-MacBook-Pro:~ ajones$ python -c "impo...Steps to reproduce
```bash
conda env create --name conda_pykat python=3.8
conda activate conda_pykat
conda install -c gwoptics pykat
python -c "import pykat"
```
Returns
```
(conda_pykat) AaronJoness-MacBook-Pro:~ ajones$ python -c "import pykat"
..-
PyKat 1.1.331 _ '(
\`.|\.__...-""""-_." )
..+-----.._ / ' ` .-'
. ' `: 7/* _/._\ \ (
( '::;;+;;: `-"' =" /,`"" `) /
L. \`:::a:f c_/ n_'
..`--...___`. . ,
`^-....____: +. www.gwoptics.org/pykat
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/ajones/miniconda3/envs/conda_pykat/lib/python3.8/site-packages/pykat/__init__.py", line 68, in <module>
if float(v.split('-')[0]) < __min_req_finesse__:
ValueError: could not convert string to float: '2.3.1.2'
```https://git.ligo.org/finesse/pykat/-/issues/15pykat prints to stdout on import2020-03-29T13:38:34ZJameson Rollinsjameson.rollins@ligo.orgpykat prints to stdout on importIt's considered bad form to print to stdout without explicitly directed to do so by the user, particularly on package import:
```
jameson.rollins@ldas-pcdev4:~ 0$ python3 -c 'import pykat'
.....It's considered bad form to print to stdout without explicitly directed to do so by the user, particularly on package import:
```
jameson.rollins@ldas-pcdev4:~ 0$ python3 -c 'import pykat'
..-
PyKat 1.2.2 _ '(
\`.|\.__...-""""-_." )
..+-----.._ / ' ` .-'
. ' `: 7/* _/._\ \ (
( '::;;+;;: `-"' =" /,`"" `) /
L. \`:::a:f c_/ n_'
..`--...___`. . ,
`^-....____: +. www.gwoptics.org/pykat
jameson.rollins@ldas-pcdev4:~ 0$
```https://git.ligo.org/finesse/pykat/-/issues/14Pykat should not catch parse errors and exit2020-03-17T14:17:46ZSean LeaveyPykat should not catch parse errors and exit[This line](https://git.ligo.org/finesse/pykat/blob/43725ae5fe67d94735eba050ab16de62957185f6/pykat/finesse.py) catches parsing errors and exits. It should be possible for tools to handle the parsing exception.
Ideally components would t...[This line](https://git.ligo.org/finesse/pykat/blob/43725ae5fe67d94735eba050ab16de62957185f6/pykat/finesse.py) catches parsing errors and exits. It should be possible for tools to handle the parsing exception.
Ideally components would throw a special parse exception and there would be no try/except to catch these in the parser at all.https://git.ligo.org/finesse/pykat/-/issues/13Remove unnecessary dependencies2020-01-22T22:27:37ZSean LeaveyRemove unnecessary dependenciesSee [here](https://chat.ligo.org/ligo/pl/euzim48p93g4fbgxe6raonjk8y).See [here](https://chat.ligo.org/ligo/pl/euzim48p93g4fbgxe6raonjk8y).https://git.ligo.org/finesse/pykat/-/issues/12Fix PyKat 1.1.331 unit tests for Python32019-09-23T08:11:43ZSteffen GrunewaldFix PyKat 1.1.331 unit tests for Python3I'm getting errors when trying to run the unit tests with Python3 (3.5, Debian Stretch), `import StringIO` fails.
Can bits from http://python-future.org/compatible_idioms.html#stringio be merged somehow to make this work?I'm getting errors when trying to run the unit tests with Python3 (3.5, Debian Stretch), `import StringIO` fails.
Can bits from http://python-future.org/compatible_idioms.html#stringio be merged somehow to make this work?https://git.ligo.org/finesse/pykat/-/issues/4Fix no FINESSE_DIR set error2018-03-28T17:59:22ZDaniel David Browndaniel.brown@ligo.orgFix no FINESSE_DIR set error```
Traceback (most recent call last):
File "ligo_tune.py", line 3, in <module>
import pykat
File "/home/runner/pykat/pykat/__init__.py", line 51, in <module>
v = kat.finesse_version()
File "/home/runner/pykat/pykat/finesse...```
Traceback (most recent call last):
File "ligo_tune.py", line 3, in <module>
import pykat
File "/home/runner/pykat/pykat/__init__.py", line 51, in <module>
v = kat.finesse_version()
File "/home/runner/pykat/pykat/finesse.py", line 1884, in finesse_version
p = Popen([self._finesse_exec(), '-v'], stdout=PIPE)
File "/home/runner/pykat/pykat/finesse.py", line 1857, in _finesse_exec
self.__finesse_dir = os.environ.get('FINESSE_DIR').strip()
AttributeError: 'NoneType' object has no attribute 'strip'
```
Should warn user betterhttps://git.ligo.org/finesse/pykat/-/issues/8pip install fails in virtual environment, all versions after 10.0.192018-03-20T06:32:43ZAndrew Wadepip install fails in virtual environment, all versions after 10.0.19I'm running MacOs 10.12.6. Installed latest Python2 2.7.14 with brew. I'm using a clean new python virtual environment and am finding I get errors thrown when I try to pip install with the latest version of PyKat.
I've copied the bash t...I'm running MacOs 10.12.6. Installed latest Python2 2.7.14 with brew. I'm using a clean new python virtual environment and am finding I get errors thrown when I try to pip install with the latest version of PyKat.
I've copied the bash terminal output below. The last version (available in pip) that installs cleanly is 10.0.19 all versions after that throw similar error.
awade@Deep-Thought:~/Downloads$ virtualenv testenv
New python executable in /Users/awade/Downloads/testenv/bin/python2.7
Also creating executable in /Users/awade/Downloads/testenv/bin/python
Installing setuptools, pip, wheel...done.
awade@Deep-Thought:~/Downloads$ . testenv/bin/activate
(testenv) awade@Deep-Thought:~/Downloads$ pip install PyKat
Collecting PyKat
Using cached PyKat-1.1.194.tar.gz
Collecting numpy>=1.12 (from PyKat)
Using cached numpy-1.14.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting flask>=0.10.1 (from PyKat)
Using cached Flask-0.12.2-py2.py3-none-any.whl
Collecting scipy (from PyKat)
Using cached scipy-1.0.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting six (from PyKat)
Using cached six-1.11.0-py2.py3-none-any.whl
Collecting h5py (from PyKat)
Using cached h5py-2.7.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting pandas (from PyKat)
Using cached pandas-0.22.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting matplotlib (from PyKat)
Using cached matplotlib-2.2.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting itsdangerous>=0.21 (from flask>=0.10.1->PyKat)
Collecting Werkzeug>=0.7 (from flask>=0.10.1->PyKat)
Using cached Werkzeug-0.14.1-py2.py3-none-any.whl
Collecting Jinja2>=2.4 (from flask>=0.10.1->PyKat)
Using cached Jinja2-2.10-py2.py3-none-any.whl
Collecting click>=2.0 (from flask>=0.10.1->PyKat)
Using cached click-6.7-py2.py3-none-any.whl
Collecting pytz>=2011k (from pandas->PyKat)
Using cached pytz-2018.3-py2.py3-none-any.whl
Collecting python-dateutil (from pandas->PyKat)
Using cached python_dateutil-2.7.0-py2.py3-none-any.whl
Collecting subprocess32 (from matplotlib->PyKat)
Collecting backports.functools-lru-cache (from matplotlib->PyKat)
Using cached backports.functools_lru_cache-1.5-py2.py3-none-any.whl
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib->PyKat)
Using cached pyparsing-2.2.0-py2.py3-none-any.whl
Collecting cycler>=0.10 (from matplotlib->PyKat)
Using cached cycler-0.10.0-py2.py3-none-any.whl
Collecting kiwisolver>=1.0.1 (from matplotlib->PyKat)
Using cached kiwisolver-1.0.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting MarkupSafe>=0.23 (from Jinja2>=2.4->flask>=0.10.1->PyKat)
Requirement already satisfied: setuptools in ./testenv/lib/python2.7/site-packages (from kiwisolver>=1.0.1->matplotlib->PyKat)
Building wheels for collected packages: PyKat
Running setup.py bdist_wheel for PyKat ... error
Complete output from command /Users/awade/Downloads/testenv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-build-MNcg8E/PyKat/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/tmpjfTSYtpip-wheel- --python-tag cp27:
fatal: Not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-build-MNcg8E/PyKat/setup.py", line 24, in <module>
with open(version_py, 'r') as fh:
IOError: [Errno 2] No such file or directory: '/private/var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-build-MNcg8E/PyKat/pykat/_version.py'
----------------------------------------
Failed building wheel for PyKat
Running setup.py clean for PyKat
Complete output from command /Users/awade/Downloads/testenv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-build-MNcg8E/PyKat/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
fatal: Not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-build-MNcg8E/PyKat/setup.py", line 24, in <module>
with open(version_py, 'r') as fh:
IOError: [Errno 2] No such file or directory: '/private/var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-build-MNcg8E/PyKat/pykat/_version.py'
----------------------------------------
Failed cleaning build dir for PyKat
Failed to build PyKat
Installing collected packages: numpy, itsdangerous, Werkzeug, MarkupSafe, Jinja2, click, flask, scipy, six, h5py, pytz, python-dateutil, pandas, subprocess32, backports.functools-lru-cache, pyparsing, cycler, kiwisolver, matplotlib, PyKat
Running setup.py install for PyKat ... error
Complete output from command /Users/awade/Downloads/testenv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-build-MNcg8E/PyKat/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-DkhvL9-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/awade/Downloads/testenv/bin/../include/site/python2.7/PyKat:
fatal: Not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-build-MNcg8E/PyKat/setup.py", line 24, in <module>
with open(version_py, 'r') as fh:
IOError: [Errno 2] No such file or directory: '/private/var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-build-MNcg8E/PyKat/pykat/_version.py'
----------------------------------------
Command "/Users/awade/Downloads/testenv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-build-MNcg8E/PyKat/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-DkhvL9-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/awade/Downloads/testenv/bin/../include/site/python2.7/PyKat" failed with error code 1 in /private/var/folders/28/469h9x852jj_lyf_td5xyptc0000gp/T/pip-build-MNcg8E/PyKat/https://git.ligo.org/finesse/pykat/-/issues/7Job Failed #391622018-03-09T04:19:12ZDaniel David Browndaniel.brown@ligo.orgJob Failed #39162Job [#39162](/finesse/pykat/-/jobs/39162) failed for 06aebbea1bd3e7c7f0fa0d7bab934365f018770b:
This doesn't work in Python 2, it doesn't like the 'end=' addition. Need to find a work around or use six package to check python version.
``...Job [#39162](/finesse/pykat/-/jobs/39162) failed for 06aebbea1bd3e7c7f0fa0d7bab934365f018770b:
This doesn't work in Python 2, it doesn't like the 'end=' addition. Need to find a work around or use six package to check python version.
```
def vprint(verbose, printstr, end='\n'):
if verbose:
print(printstr, end=end)
```Daniel Toyradaniel.toyra@ligo.orgDaniel Toyradaniel.toyra@ligo.orghttps://git.ligo.org/finesse/pykat/-/issues/2qnoised/qshot doesn't recognize k, M, etc.2017-06-21T23:46:18ZHang Yuqnoised/qshot doesn't recognize k, M, etc.[filt_cav.kat](/uploads/beb965e1d26dc22c0c4b7c104d4449ad/filt_cav.kat)
The kat file is attached. There are also additional commands
cmd=
"""
pd2 SUM1_I_ac $f_sb 0 10 n_wfs1
qnoised SUM1_I_n 2 2248443.435 0 10 n_wfs1
...[filt_cav.kat](/uploads/beb965e1d26dc22c0c4b7c104d4449ad/filt_cav.kat)
The kat file is attached. There are also additional commands
cmd=
"""
pd2 SUM1_I_ac $f_sb 0 10 n_wfs1
qnoised SUM1_I_n 2 2248443.435 0 10 n_wfs1
fsig sig1 M2HR ybeta 10 0 1u
fsig sig2 M2AR ybeta 10 0 1u
xaxis sig1 f log 0.1 1k 30
put SUM1_I_ac f2 $x1
put SUM1_I_n f2 $x1
yaxis re:im
"""
For qnoised the '2248443.435' one can be handled properly, but if I use '2.248443435M' instead and run the file with pykat, I get "ValueError: could not convert string to float: '2.248443435M'"