p-e-w / argos

Create GNOME Shell extensions in seconds
https://extensions.gnome.org/extension/1176/argos/
1.66k stars 112 forks source link

Python read file #125

Closed Bakirbrkic closed 3 years ago

Bakirbrkic commented 3 years ago

I am writing a plugin/extension using python, and I am trying to read some data from a file in order to show it in the extension, however, the plugin is not showing anything while these lines are present in the script:

with open('./dat/vars.json') as json_file:
    vars = json.load(json_file)

If I run the script in the terminal I DO get the desired results, so the complete code does work normally, but when it is used through Argos it fails to display anything but the script name in the dropdown

also if I comment out / remove above-mentioned lines the plugin behaves normally, other functionality like: displaying the data fetched from an API, or doing mathematical operations works well

any help would be more than welcome

Bakirbrkic commented 3 years ago

it was the path problem, when the script is running from Argos it behaves like it is in /home/[user] directory instead in /home/user/.cfig/argos