Hi Matthew - Hmm ... well, testing on 10.7 will be tricky for debugging
purposes. It looks like you installed GR via MacPorts ... yes? This
looks like the same issue as < https://trac.macports.org/ticket/53236[1]
>, yes?  OK; I'm working on fixing this; hopefully this afternoon.
Cheers! - MLD


On Sat, Jan 7, 2017, at 04:06 AM, Matthew Chambers wrote:

> I get the following error when I try to run anything that uses
> gnuradio, such as gqrx, gnuradio-companion or uhd_rx_nogui.
> 

> $ uhd_rx_nogui 

> Traceback (most recent call last):

>   File "/opt/local/bin/uhd_rx_nogui", line 23, in <module>

>     from gnuradio import gr, gru, uhd, audio

>   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/l-
>   ib/python2.7/site-packages/gnuradio/gr/__init__.py", line 56, in
>   <module>
>     log.add_console_appender(log_file, " gr::log %d :%p: %m%n")

>   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/l-
>   ib/python2.7/site-packages/gnuradio/gr/runtime_swig.py", line 6987,
>   in add_console_appender
>     return _runtime_swig.logger_add_console_appender(self, target,
>     pattern)
> RuntimeError: unterminated conversion specifier in ' gr::log %d :%p:
> %m%n' at index -1
> 

> I've looked at source code and not knowing python, I'm really don't
> know how to proceed. (I'm a C++/C# guy)
> 

> in runtime_swig.py, 

> 6985     def add_console_appender(self, target, pattern):

> 6986         """add_console_appender(logger self, std::string target,
> std::string pattern)"""
> 6987         return _runtime_swig.logger_add_console_appender(self,
> target, pattern)
> 6988 

> 6989 

> 6990     def add_file_appender(self, filename, append, pattern):

> 6991         """add_file_appender(logger self, std::string filename,
> bool append, std::string pattern)"""
> 6992         return _runtime_swig.logger_add_file_appender(self,
> filename, append, pattern)
> 

> and back one call, in __init__.py

> 49 # Force the preference database to be initialized

> 50 prefs = prefs.singleton

> 51 

> 52 log = gr.logger("log")

> 53 log.set_level(prefs().get_string("LOG", "log_level", "notset"))

> 54 log_file = gr.prefs().get_string("LOG", "log_file", "");

> 55 if(log_file == "stderr" or log_file == "stdout"):

> 56     log.add_console_appender(log_file, "gr::log %d :%p: %m%n")

> 57 else:

> 58     log.add_file_appender(log_file, True, "%r :%p: %c{1} - %m%n")

> 59  

> 60 log_debug = gr.logger("log_debug")

> 61 log_debug.set_level(prefs().get_string("LOG", "debug_level",
> "notset"))
> 62 log_debug_file = gr.prefs().get_string("LOG", "debug_file", "");

> 63 if(log_debug_file == "stderr" or log_file == "stdout"):

> 64     log_debug.add_console_appender(log_debug_file, "gr::log %d
> :%p: %m%n")
> 65 else:

> 66     log_debug.add_file_appender(log_debug_file, True, "%r :%p:
> %c{1} - %m%n")
> 67 




Links:

  1. https://trac.macports.org/ticket/53236#comment:1
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to