syabruk/pync

pync was not properly installed

KvashaIhor opened this issue · 3 comments

Hi
I have an "Exception: pync was not properly installed. Head over to https://github.com/SeTeM/pync/ and file a bug." during compiling program with py2app. I've installed an actual version from github, but it didn't work. Also I found here a bug issue #17, but I dont even have this files on package directories.
That's my first topic, so I'll also put my code there, may be it will be useful.

import clipboard
import pync
import time

with open('таблицапринтов.txt') as f:
    content = f.readlines()
content = [x.strip() for x in content]
keydict = {}
for i in range(len(content)):
    k=content[i]
    test = content[i].split()
    keydict[test[0]] = test[len(test)-1]
check=0
while True:
    time.sleep(1.5)
    text = clipboard.paste()
    if not text==check:
     if text in keydict.keys():
        pync.notify('Ссылка в буфере', appIcon='right.png', title='PrintSearch')
        clipboard.copy(keydict[text])
        check=text
     elif not text in keydict.values():
        pync.notify('Ссылки нет в базе', appIcon='wrong.png', title='PrintSearch')
        check=text
  • default setup.py py2app file
    Pls help

@KvashaIhor any updates? I will check this issue asap.

The problem is that it goes to get the terminal-notifier app to the wrong path since you use:

else:
            self.app_path = os.path.join(
                os.path.dirname(__file__),
                "vendor/terminal-notifier-%s/terminal-notifier.app" % self.TERMINAL_NOTIFIER_VERSION

The package gets installed in the site-packages dir, and the terminal-notifier does not get copied there.

There is a way to force the package to be installed in the same exact path than the original files are, and then the path is added to sys.path:

pip install -e "." (while you are in the source code root path)

pip install -e "." did not work for me. I still get the error when running a program packaged with py2app. What else can I try?