Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running from source #36

Closed
intel352 opened this issue Nov 3, 2015 · 7 comments
Closed

Error when running from source #36

intel352 opened this issue Nov 3, 2015 · 7 comments

Comments

@intel352
Copy link

intel352 commented Nov 3, 2015

(On OSX) I've cloned the repo, installed Python 2.7 via brew, installed requests, updated activetcl, etc. When I attempt to run EDMarketConnector.py, I get the following error:

Traceback (most recent call last):
  File "./EDMarketConnector.py", line 411, in <module>
    app = AppWindow(root)
  File "./EDMarketConnector.py", line 170, in __init__
    hotkeymgr.register(self.w, config.getint('hotkey_code'), config.getint('hotkey_mods'))
  File "/Users/jlangevin/repos/EDMarketConnector/hotkey.py", line 69, in register
    self.tkProcessKeyEvent_old = NSApplication.sharedApplication().methodForSelector_(sel)
AttributeError: No selector tkProcessKeyEvent:

Any suggestions?

@Marginal
Copy link
Contributor

Marginal commented Nov 3, 2015

It's designed to be run with the built-in Python, Tcl/Tk etc on OSX.

Try running with ./EDMarketConnector.py Edit: Looking more carefully, that is what you're doing.
I suggest reconfiguring your activetcl installation to remove activetcl from the default Python's search path.

@intel352
Copy link
Author

intel352 commented Nov 3, 2015

I was getting this error prior to installing activetcl, and installing it didn't change the error. So if anything, I'm betting it's more related to me using Python installed via brew. I'll try w/ the vanilla Python install.

@Marginal
Copy link
Contributor

Marginal commented Nov 3, 2015

If you've overwritten /usr/bin/python with the Homebrew Python, then you can invoke the built-in Python with python2.7 EDMarketConnector.py or, if you've overwritten that too, with /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python EDMarketConnector.py

@intel352
Copy link
Author

intel352 commented Nov 3, 2015

I didn't replace Python directly, I only updated the .py scripts to reference the /usr/local/bin/python executable instead.

Reverting that, and removing my change that disabled the hotkey logic, allows me to run the app without any error. It would be nice to be able to get this working without having to rely on system-version binaries, but it's working now so that'll suffice.

Thanks!

@intel352 intel352 closed this as completed Nov 3, 2015
@Marginal
Copy link
Contributor

Marginal commented Nov 3, 2015

I only updated the .py scripts to reference the /usr/local/bin/python executable instead.

And you didn't think to mention this in your original post?

It would be nice to be able to get this working without having to rely on system-version binaries

Why? But if it bothers you then I'll welcome a patch that detects your versions of Python and/or Tcl/Tk and does the right thing.

@intel352
Copy link
Author

intel352 commented Nov 3, 2015

Sorry for not being more clear previously, felt I'd implied that when I mentioned I installed python via brew, but I can see that would be misleading due to how the .py was executed.

Re: avoiding reliance on system-version binaries, OSes don't always keep their software packages up to date, so it's nice to be able to use a package manager. Guess I'm personally just more inclined to installing explicit library versions, such as is done with PHP (Composer), NodeJS (npm), Ruby (gem).

@Marginal
Copy link
Contributor

Marginal commented Nov 3, 2015

I'd happy to re-open if you can provide a reason why it's important that this program should work when modified to use a non-default version of Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants