Skip to content

Commit

Permalink
Fix bug with importing Configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
annie444 committed Feb 1, 2023
1 parent af35659 commit 5d4c5c5
Show file tree
Hide file tree
Showing 4 changed files with 175 additions and 7 deletions.
161 changes: 161 additions & 0 deletions .pyre/pyre.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -1999,3 +1999,164 @@ Traceback (most recent call last):
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 60, in create
raise configuration_module.InvalidConfiguration(
pyre_check.client.configuration.exceptions.InvalidConfiguration: Invalid configuration: Cannot locate a Pyre binary to run.
2023-02-01 08:36:55,890 [PID 87148] DEBUG Using selector: KqueueSelector
2023-02-01 08:36:55,890 [PID 87148] INFO Reading Pyre server configurations...
2023-02-01 08:36:55,891 [PID 87148] INFO No binary specified, looking for `pyre.bin` in PATH
2023-02-01 08:36:55,896 [PID 87148] ERROR Uncaught error in persistent.run
Traceback (most recent call last):
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 502, in run
return asyncio.get_event_loop().run_until_complete(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.pyenv/versions/3.11.1/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 436, in run_persistent
initial_server_options = launch_and_subscribe_handler.PyreDaemonLaunchAndSubscribeHandler.read_server_options(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/launch_and_subscribe_handler.py", line 120, in read_server_options
return server_options_reader()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 93, in read
return PyreServerOptions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 60, in create
raise configuration_module.InvalidConfiguration(
pyre_check.client.configuration.exceptions.InvalidConfiguration: Invalid configuration: Cannot locate a Pyre binary to run.
2023-02-01 09:19:52,566 [PID 20698] DEBUG Using selector: KqueueSelector
2023-02-01 09:19:52,567 [PID 20698] INFO Reading Pyre server configurations...
2023-02-01 09:19:52,568 [PID 20698] INFO No binary specified, looking for `pyre.bin` in PATH
2023-02-01 09:19:52,574 [PID 20698] ERROR Uncaught error in persistent.run
Traceback (most recent call last):
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 502, in run
return asyncio.get_event_loop().run_until_complete(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.pyenv/versions/3.11.1/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 436, in run_persistent
initial_server_options = launch_and_subscribe_handler.PyreDaemonLaunchAndSubscribeHandler.read_server_options(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/launch_and_subscribe_handler.py", line 120, in read_server_options
return server_options_reader()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 93, in read
return PyreServerOptions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 60, in create
raise configuration_module.InvalidConfiguration(
pyre_check.client.configuration.exceptions.InvalidConfiguration: Invalid configuration: Cannot locate a Pyre binary to run.
2023-02-01 09:25:07,003 [PID 24126] DEBUG Using selector: KqueueSelector
2023-02-01 09:25:07,003 [PID 24126] INFO Reading Pyre server configurations...
2023-02-01 09:25:07,003 [PID 24126] INFO No binary specified, looking for `pyre.bin` in PATH
2023-02-01 09:25:07,004 [PID 24126] ERROR Uncaught error in persistent.run
Traceback (most recent call last):
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 502, in run
return asyncio.get_event_loop().run_until_complete(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.pyenv/versions/3.11.1/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 436, in run_persistent
initial_server_options = launch_and_subscribe_handler.PyreDaemonLaunchAndSubscribeHandler.read_server_options(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/launch_and_subscribe_handler.py", line 120, in read_server_options
return server_options_reader()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 93, in read
return PyreServerOptions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 60, in create
raise configuration_module.InvalidConfiguration(
pyre_check.client.configuration.exceptions.InvalidConfiguration: Invalid configuration: Cannot locate a Pyre binary to run.
2023-02-01 10:08:33,202 [PID 38583] DEBUG Using selector: KqueueSelector
2023-02-01 10:08:33,203 [PID 38583] INFO Reading Pyre server configurations...
2023-02-01 10:08:33,203 [PID 38583] INFO No binary specified, looking for `pyre.bin` in PATH
2023-02-01 10:08:33,205 [PID 38583] ERROR Uncaught error in persistent.run
Traceback (most recent call last):
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 502, in run
return asyncio.get_event_loop().run_until_complete(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.pyenv/versions/3.11.1/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 436, in run_persistent
initial_server_options = launch_and_subscribe_handler.PyreDaemonLaunchAndSubscribeHandler.read_server_options(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/launch_and_subscribe_handler.py", line 120, in read_server_options
return server_options_reader()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 93, in read
return PyreServerOptions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 60, in create
raise configuration_module.InvalidConfiguration(
pyre_check.client.configuration.exceptions.InvalidConfiguration: Invalid configuration: Cannot locate a Pyre binary to run.
2023-02-01 10:53:48,580 [PID 50248] DEBUG Using selector: KqueueSelector
2023-02-01 10:53:48,581 [PID 50248] INFO Reading Pyre server configurations...
2023-02-01 10:53:48,581 [PID 50248] INFO No binary specified, looking for `pyre.bin` in PATH
2023-02-01 10:53:48,584 [PID 50248] ERROR Uncaught error in persistent.run
Traceback (most recent call last):
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 502, in run
return asyncio.get_event_loop().run_until_complete(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.pyenv/versions/3.11.1/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 436, in run_persistent
initial_server_options = launch_and_subscribe_handler.PyreDaemonLaunchAndSubscribeHandler.read_server_options(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/launch_and_subscribe_handler.py", line 120, in read_server_options
return server_options_reader()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 93, in read
return PyreServerOptions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 60, in create
raise configuration_module.InvalidConfiguration(
pyre_check.client.configuration.exceptions.InvalidConfiguration: Invalid configuration: Cannot locate a Pyre binary to run.
2023-02-01 10:55:47,625 [PID 50740] DEBUG Using selector: KqueueSelector
2023-02-01 10:55:47,625 [PID 50740] INFO Reading Pyre server configurations...
2023-02-01 10:55:47,626 [PID 50740] INFO No binary specified, looking for `pyre.bin` in PATH
2023-02-01 10:55:47,627 [PID 50740] ERROR Uncaught error in persistent.run
Traceback (most recent call last):
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 502, in run
return asyncio.get_event_loop().run_until_complete(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.pyenv/versions/3.11.1/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 436, in run_persistent
initial_server_options = launch_and_subscribe_handler.PyreDaemonLaunchAndSubscribeHandler.read_server_options(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/launch_and_subscribe_handler.py", line 120, in read_server_options
return server_options_reader()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 93, in read
return PyreServerOptions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 60, in create
raise configuration_module.InvalidConfiguration(
pyre_check.client.configuration.exceptions.InvalidConfiguration: Invalid configuration: Cannot locate a Pyre binary to run.
2023-02-01 11:06:49,584 [PID 52292] DEBUG Using selector: KqueueSelector
2023-02-01 11:06:49,584 [PID 52292] INFO Reading Pyre server configurations...
2023-02-01 11:06:49,585 [PID 52292] INFO No binary specified, looking for `pyre.bin` in PATH
2023-02-01 11:06:49,587 [PID 52292] ERROR Uncaught error in persistent.run
Traceback (most recent call last):
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 502, in run
return asyncio.get_event_loop().run_until_complete(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.pyenv/versions/3.11.1/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/persistent.py", line 436, in run_persistent
initial_server_options = launch_and_subscribe_handler.PyreDaemonLaunchAndSubscribeHandler.read_server_options(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/launch_and_subscribe_handler.py", line 120, in read_server_options
return server_options_reader()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 93, in read
return PyreServerOptions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/annieehler/.local/share/nvim/mason/packages/pyre/venv/lib/python3.11/site-packages/pyre_check/client/commands/pyre_server_options.py", line 60, in create
raise configuration_module.InvalidConfiguration(
pyre_check.client.configuration.exceptions.InvalidConfiguration: Invalid configuration: Cannot locate a Pyre binary to run.
15 changes: 11 additions & 4 deletions SLEAPyExample.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
"metadata": {},
"outputs": [],
"source": [
"from sleapyfaces.base import Project \n",
"from sleapyfaces.base import Project\n",
"\n",
"proj = Project(\n",
" ExperimentEventsFile=(\"*_events.csv\", True), # we assign the events file (which is a csv file)\n",
" ExperimentSetupFile=(\"*.json\", True), # we assign the experiment setup file (which is a json file)\n",
Expand Down Expand Up @@ -290,14 +291,20 @@
"cell_type": "code",
"execution_count": null,
"id": "1d3ecb91",
"metadata": {
"lines_to_next_cell": 3
},
"metadata": {},
"outputs": [],
"source": [
"\n",
"expr.visualize(dimensions=3, normalized=True, filename=\".ignore/3DExample.html\") # This will visualize the data in 3D and output the visualization as an interactive plot. "
]
},
{
"cell_type": "markdown",
"id": "d7d49083",
"metadata": {
"lines_to_next_cell": 2
},
"source": []
}
],
"metadata": {
Expand Down
4 changes: 3 additions & 1 deletion SLEAPyExample.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
# %% [markdown]
For a single `Project` analysis, you will need to have multiple folders containing all the necessary `Experiment` files.
# %%
from sleapyfaces.base import Project
from sleapyfaces.base import Project

proj = Project(
ExperimentEventsFile=("*_events.csv", True), # we assign the events file (which is a csv file)
ExperimentSetupFile=("*.json", True), # we assign the experiment setup file (which is a json file)
Expand Down Expand Up @@ -144,4 +145,5 @@

expr.visualize(dimensions=3, normalized=True, filename=".ignore/3DExample.html") # This will visualize the data in 3D and output the visualization as an interactive plot.

# %% [markdown]

2 changes: 0 additions & 2 deletions sleapyfaces/base/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import pandas as pd
import plotly.graph_objects as go
from config import config
from config.configuration_set import ConfigurationSet
from pathvalidate._filename import is_valid_filename

Expand Down Expand Up @@ -581,7 +580,6 @@ def save(self, filename: str | pd.HDFStore, title: str = None, all: bool = False
store.put("all_data", self.all_data)
store.put("all_scores", self.all_scores)


def current_config(self) -> None:
print(self.config)

Expand Down

0 comments on commit 5d4c5c5

Please sign in to comment.