Open plum opened 3 years ago
Did you install pyyaml via pacman or via pip? Can you see if you’re able to import it in an MVE (minimum viable example)?
— Gideon Farrell Cofounder / CTO https://www.converge.io
On 13 Mar 2021, at 03:43, plum @.***> wrote:
Thanks for what appears to be a neat addition to a suite of rofi scripts, opne I hope to implement successfully.
I launch the script with rofi_khard.sh, and my card list is brought up nicely in rofi, but when I select to press enter on an item, I get a problem running the script, card_display.py, as follows.
import: `yaml' @ error/import.c/ImportImageCommand/1288. card_display.py: line 11: yaml_doc: command not found I do have the python3_pyaml installed. I am running this on arch. Any clues?
Thanks, John
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Ah, actually can you check that the python script is executable? Try chmod +x card_display.py
and see if it works.
It appears from your error message that it’s reading the variable assignment within your shell as a command?
@plum did you get anywhere with this?
@plum did you get anywhere with this?
A yes, Thanks for reply, sorry for missing it. I Trust all is well.
Yes. The script is executable. Things changed, probably after ensuring the card_display.py was executable.
I still get an error messag ewhen selecting a field such as email and phone, aslo when selecting tename field, the same error;
arch-t440p: ~$ rofi -modi contacts:./.bin/rofi/rofi_khard -show contacts
Found no contact
Traceback (most recent call last):
File "/home/chuee/.bin/rofi/card_display.py", line 17, in <module>
("name", contact.get("Formatted name")),
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
I should add that I'm running this on arch with sway, and therefore needed to change line 19 of rofi_card.sh to the following, hoping it is sufficient in python:
echo $result | wlcopy >/dev/null
But i don't tink that is producing the error. A very useful set script I say. Still hoping to get it sorted.
Cheers, JOhn
I see the same thing if I try to give the script a contact name who is not found, eg.:
~ > ~/projects/rofi-khard/rofi_khard.sh Nonexistent
Found no contact
Traceback (most recent call last):
File "/home/gideon/projects/rofi-khard/card_display.py", line 17, in <module>
("name", contact.get("Formatted name")),
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
Are you giving it a non-existent contact? Maybe there are characters in the name it can't handle?
Thanks for what appears to be a neat addition to a suite of rofi scripts, opne I hope to implement successfully.
I launch the script with rofi_khard.sh, and my card list is brought up nicely in rofi, but when I select to press enter on an item, I get a problem running the script, _carddisplay.py, as follows.
I do have the python3_pyaml installed. I am running this on arch. Any clues?
Thanks, John