-
Notifications
You must be signed in to change notification settings - Fork 26
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
Chapter 11 - Text Search - Weird exception being thrown #26
Comments
Hmmm. Works on Linux (Xubuntu 18.04) and Windows 7. I will have to try this on my Mac later |
Works on my Macbook Pro 10.14.4, Python 3.6.4. I do see this in stdout: objc[11673]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/FinderKit (0x12a2df3c8) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x132108f50). One of the two will be used. Which one is undefined. However, this error or warning does not seem to affect the running of the program at all. Are you sure you are installing grin3 ? |
Looks like my warning has something to do with Tkinter - jarvisteach/appJar#285 I don't know why it shows up when running wxPython, but that thread mentions that PyQt5 is also causing that error to pop up, so maybe it just has something to do with GUI toolkits in general. Doesn't seem to affect anything though. |
Pretty sure. I’m working in a virtual python environment and I’ve installed grin3 via: pip install grin3.
I’ll do some more investigation and see what I can turn up. :-/
… On Apr 25, 2019, at 6:08 PM, Mike Driscoll ***@***.***> wrote:
Works on my Macbook Pro 10.14.4, Python 3.6.4. I do see this in stdout:
objc[11673]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/FinderKit (0x12a2df3c8) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x132108f50). One of the two will be used. Which one is undefined.
However, this error or warning does not seem to affect the running of the program at all.
Are you sure you are installing grin3 ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#26 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAA62YJWOUGI7N5SDGKQ6FTPSJIX5ANCNFSM4HIOBLCQ>.
|
Hmmm. I will have to try creating a virtualenv then when I get a chance. Not sure why that would happen in that scenario though |
I created a virtualenv using Python's |
This is quite strange. Figuring I had screwed something up, I did the following:
1. Create new directory
2. Change to the new directory
3. Create Python 3 virtual environment (python3 -m venv .)
4. Activate Python 3 (source bin/activate)
5. Update pip (pip install pip —upgrade)
6. Install wxPython (pip install wxPython)
7. Install ObjectListView (pip install ObjectListView)
8. Install grin3 (pip install grin3)
9. Install PyPubSub (pip install PyPubSub)
10. Do a pull on the Git repo to ensure that the code is current
11. Copy the chapter 11 folder to the new directory.
12. Run the program.
13. Set the config.ini location in Preferences and save.
[Settings]
grin = /Users/chuck/pytest/text_search/config.ini
14. Select the current directory where the source code resides using the Browse button.
15. Type pref in the search field then tap Enter
16. Nothing appears in the ObjectListView and I get the following message in the terminal window:
objc[6019]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fff8d11b3c8) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x115aa1f50). One of the two will be used. Which one is undefined.
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/Users/chuck/pytest/text_search/search_thread.py", line 29, in run
output = subprocess.check_output(cmd, encoding='UTF-8')
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/Users/chuck/pytest/text_search/config.ini'
I installed Python 3 using Homebrew, so I have no idea why it’s seeing two different versions of Class FIFinderSyncExtensionHost. However, I’m not sure that it has anything to do with the permissions issue. :-/
Thoughts appreciated.
Best regards,
Chuck
… On Apr 26, 2019, at 6:18 PM, Mike Driscoll ***@***.***> wrote:
I created a virtualenv using Python's venv module. I installed wxPython, PyPubSub and ObjectListView in it and the text search code worked fine for me.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#26 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAA62YOYZHW6JNKE7KQJSH3PSOSYFANCNFSM4HIOBLCQ>.
|
Hi Mike,
I have removed all versions of Python (other than the system installed 2.7), then reinstalled Python 3 using Homebrew. I’m now getting the following error message in the terminal:
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/Users/chuck/pytest/text_search/search_thread.py", line 29, in run
output = subprocess.check_output(cmd, encoding='UTF-8')
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/Users/chuck/pytest/text_search/config.ini’
Weirder and weirder...
… On Apr 26, 2019, at 6:18 PM, Mike Driscoll ***@***.***> wrote:
I created a virtualenv using Python's venv module. I installed wxPython, PyPubSub and ObjectListView in it and the text search code worked fine for me.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#26 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAA62YOYZHW6JNKE7KQJSH3PSOSYFANCNFSM4HIOBLCQ>.
|
I hate to ask this, but could you try with Python 3.6? I wonder if there is some weird incompatibility with 3.7. I don't have 3.7 on my Mac at the moment to test with. |
Windows 10 appears to work wit Python 3.7, although I am seeing this error in stdout:
I still get search results though. |
I went ahead and fixed the issue I mentioned finding on Windows 10 |
FYI: I added Python 3.7 to my Mac and ran this code. I do get an error now that does not appear in 3.6. However, it is different from yours:
This appears to be a grin bug, not one with my code. I do get some search results returned regardless of the error, although I don't know if I am getting all the results I should. |
Just downloaded the code for this same project and am trying to run it under VSCode 1.74.0 on Win10. |
Never finds the config.ini. Always claims grin3 not installed even though it is and the config.ini file exists. Repo code has the same issue as the book code.
Mac OS 10.14.4
32G RAM
Python 3.7.3
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/Volumes/ProjectDrive/git-projects/Creating_GUI_Applications_with_wxPython/src/Chapter_11/text_search/search_thread.py", line 29, in run
output = subprocess.check_output(cmd, encoding='UTF-8')
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in init
restore_signals, start_new_session)
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/Volumes/ProjectDrive/git-projects/Creating_GUI_Applications_with_wxPython/src/Chapter_11/text_search/config.ini'
-rw-r--r-- 1 chuck wheel 132B Apr 25 08:01 config.ini
-rw-r--r-- 1 chuck wheel 7.2K Apr 25 07:54 main.py
-rw-r--r-- 1 chuck wheel 2.6K Apr 25 07:44 preferences.py
-rw-r--r-- 1 chuck wheel 1.2K Apr 25 07:53 search_thread.py
The text was updated successfully, but these errors were encountered: