You are not logged in.

#1 2011-03-14 08:25:41

jceasless
Member
Registered: 2009-04-20
Posts: 73

[solved] scribes 0.4 - Word Completion Broken

I have installed the newest version of the scribes editor found in [community]. While it installs without problem, I noticed that word completion does not appear to be working. When run from the command line I see this:

Traceback (most recent call last):
  File "/usr/lib/scribes/GenericPlugins/WordCompletion/SuggestionProcess/ScribesWordCompletionSuggestionGenerator.py", line 5, in <module>
    from SCRIBES.Utils import fork_process
ImportError: No module named SCRIBES.Utils
Traceback (most recent call last):
  File "/usr/lib/scribes/GenericPlugins/RecentOpen/ExternalProcess/ScribesRecentFilesIndexer.py", line 8, in <module>
    from gobject import MainLoop, threads_init
ImportError: No module named gobject
Traceback (most recent call last):
  File "/usr/lib/scribes/GenericPlugins/WordCompletion/IndexerProcess/ScribesWordCompletionIndexer.py", line 3, in <module>
    from SCRIBES.Utils import fork_process
ImportError: No module named SCRIBES.Utils

And idea what the problem might be?

Last edited by jceasless (2011-10-26 08:22:56)

Offline

#2 2011-04-30 11:23:45

konradstrack
Member
Registered: 2011-04-30
Posts: 1

Re: [solved] scribes 0.4 - Word Completion Broken

I've just been attacked with exactly the same console output after running scribes, and after some investigation it seems like some parts of scribes are being run using python3 instead of python2.
E.g. /usr/lib/scribes/GenericPlugins/RecentOpen/ExternalProcess/ScribesRecentFilesIndexer.py is being run with python3 (/usr/bin/python instead of /usr/bin/python2), and the gobject module doesn't exist for python3 yet (there is something in testing though).

Any idea how to force scribes to use proper version of python? I'd much appreciate any solution different than "ln -sf /usr/bin/python2 /usr/bin/python" ;)

EDIT:
I managed to overcome the problem. Just patch the sources with this:

=== modified file 'GenericPlugins/RecentOpen/ExternalProcessStarter.py'
--- GenericPlugins/RecentOpen/ExternalProcessStarter.py    2010-11-03 03:46:51 +0000
+++ GenericPlugins/RecentOpen/ExternalProcessStarter.py    2011-04-30 13:19:23 +0000
@@ -18,11 +18,11 @@
 
     def __init_attributes(self, editor):
         from os.path import join
-        from sys import prefix
+        from sys import executable
         self.__editor = editor
         self.__cwd = self.__editor.get_current_folder(globals())
         self.__executable = join(self.__cwd, "ExternalProcess", "ScribesRecentFilesIndexer.py")
-        self.__python_executable = join(prefix, "bin", "python")
+        self.__python_executable = executable
         return
 
     def __destroy(self):

=== modified file 'GenericPlugins/WordCompletion/IndexerProcessManager.py'
--- GenericPlugins/WordCompletion/IndexerProcessManager.py    2011-01-14 10:58:48 +0000
+++ GenericPlugins/WordCompletion/IndexerProcessManager.py    2011-04-30 13:18:53 +0000
@@ -20,13 +20,13 @@
 
     def __init_attributes(self, manager, editor):
         from os.path import join
-        from sys import prefix
+        from sys import executable
         self.__manager = manager
         self.__editor = editor
         self.__cwd = self.__editor.get_current_folder(globals())
         exec_folder = join(self.__cwd, "IndexerProcess")
         self.__executable = join(exec_folder, "ScribesWordCompletionIndexer.py")
-        self.__python_executable = join(prefix, "bin", "python")
+        self.__python_executable = executable
         return
 
     def __destroy(self):

=== modified file 'GenericPlugins/WordCompletion/SuggestionProcessManager.py'
--- GenericPlugins/WordCompletion/SuggestionProcessManager.py    2011-01-26 16:59:05 +0000
+++ GenericPlugins/WordCompletion/SuggestionProcessManager.py    2011-04-30 13:18:26 +0000
@@ -19,12 +19,12 @@
 
     def __init_attributes(self, editor):
         from os.path import join
-        from sys import prefix
+        from sys import executable
         self.__editor = editor
         generator_script = "ScribesWordCompletionSuggestionGenerator.py"
         self.__cwd = self.__editor.get_current_folder(globals())
         self.__executable = join(self.__cwd, "SuggestionProcess", generator_script)
-        self.__python_executable = join(prefix, "bin", "python")
+        self.__python_executable = executable
         return
 
     def __start(self):

Last edited by konradstrack (2011-04-30 13:23:43)

Offline

#3 2011-05-27 14:08:50

jceasless
Member
Registered: 2009-04-20
Posts: 73

Re: [solved] scribes 0.4 - Word Completion Broken

Thanks!!

Offline

#4 2011-05-27 16:04:49

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,785

Re: [solved] scribes 0.4 - Word Completion Broken

jceasless wrote:

Thanks!!

Solved?  If so, please edit your first post and add [solved] to the title

Thanks


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB