AtsushiSakai / AtsushiSakai/PyJSONViewer

Unable to open JSON file in pwd

Open
#48 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
88
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Installed using `pip3 install pyjsonviewer` — Received a `_tkinter` error and resolved that using `brew install python-tk`

I have a `.json` file located in a directory (pwd) — `repos/data_objects/exported.json`

When I run `python3 pyjsonviewer -f exported.json` OR `python3 pyjsonviewer -f repos/data_objects/exported.json` I get the same error.

```
(14:52:30)──> python3 pyjsonviewer -f exported.json 2 ↵ ──(Tue,Oct11)─┘
/opt/homebrew/bin/python3: can't open file '/Users/username/repos/data_objects/pyjsonviewer': [Errno 2] No such file or directory
```

AND

```
(14:51:19)──> python3 pyjsonviewer -f ~/repos/data_objects/exported.json 2 ↵ ──(Tue,Oct11)─┘
/opt/homebrew/bin/python3: can't open file '/Users/username/repos/data_objects/pyjsonviewer': [Errno 2] No such file or directory
```
After installing `python-tk` with brew (`brew install python-tk`) running `$ pyjsonviewer` spawns a tree nav pane, as expected.

```└─(16:04:01)──> pyjsonviewer 130 ↵ ──(Tue,Oct11)─┘
/opt/homebrew/lib/python3.10/site-packages/pyjsonviewer/pyjsonviewer.py start!!
```

From the `pyjsonviewer` pane, I'm able to open the file.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.