Archlinux: obmenu won't start - gtk

I'm on openbox at Arch Linux and recently installed my system.
I want to use obmenu to configure the menu.
But for some reason, it is not working.
Error at startup:
Traceback (most recent call last):
File "/usr/bin/obmenu", line 582, in <module>
app.init()
File "/usr/bin/obmenu", line 489, in init
self.menu.loadMenu(self.menu_path)
File "/usr/lib/python2.7/site-packages/obxml.py", line 153, in loadMenu
self.dom = xml.dom.minidom.parseString(fil.read())
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 167, column 27
What is going wrong?

I already solved it. My menu contained an Formatting Mistake!

First you have to remove
rm ~/.config/openbox/menu.xml
and then
cp /etc/xdg/openbox/menu.xml ~/.config/openbox
after that obmenu will work.
Look at the http://obmenu.sourceforge.net/doc.html.
The problem is that you have menu.xml which does't have correct syntax. Evan empty file is wrong.

Related

Librabbitmq 2.0.0 with Python 3 gives TypeError: can't pickle memoryview objects

I am using the latest master branch of the git repo https://github.com/celery/librabbitmq and installing librabbitmq==2.0.0 for Python 3.6 by following the instructions in the readme
Using the development version
You can clone the repository by doing the following:
$ git clone git://github.com/celery/librabbitmq.git
Then install it by doing the following:
$ cd librabbitmq
$ make install # or make develop
This works fine (after installing certain binaries for c compliation in the OS), but when I then make a small a+b add task and call it with add.delay(2,2) it fails with the following error. I looked up and saw that Celery 4 uses json as serializer, so clearly it is not because if pickle serialization
Changing from librabbitmq to pyamqp broker works normally
Same exact situation in both MacOS and Ubuntu 16
[2018-04-30 23:40:02,956: CRITICAL/MainProcess] Unrecoverable error:
SystemError(' returned a result with an error set',) Traceback (most
recent call last): File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/messaging.py",
line 624, in _receive_callback
return on_m(message) if on_m else self.receive(decoded, message) File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 570, in on_task_received
callbacks, File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/strategy.py",
line 145, in task_message_handler
handle(req) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/worker.py",
line 221, in _process_task_sem
return self._quick_acquire(self._process_task, req) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/async/semaphore.py",
line 62, in acquire
callback(*partial_args, **partial_kwargs) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/worker.py",
line 226, in _process_task
req.execute_using_pool(self.pool) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/request.py",
line 531, in execute_using_pool
correlation_id=task_id, File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/concurrency/base.py",
line 155, in apply_async
**options) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/billiard/pool.py",
line 1486, in apply_async
self._quick_put((TASK, (result._job, None, func, args, kwds))) File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/concurrency/asynpool.py",
line 813, in send_job
body = dumps(tup, protocol=protocol) TypeError: can't pickle memoryview objects
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/worker.py",
line 203, in start
self.blueprint.start(self) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/bootsteps.py",
line 119, in start
step.start(parent) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/bootsteps.py",
line 370, in start
return self.obj.start() File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 320, in start
blueprint.start(self) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/bootsteps.py",
line 119, in start
step.start(parent) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 596, in start
c.loop(*c.loop_args()) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/loops.py",
line 88, in asynloop
next(loop) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/async/hub.py",
line 354, in create_loop
cb(*cbargs) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/transport/base.py",
line 236, in on_readable
reader(loop) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/transport/base.py",
line 218, in _read
drain_events(timeout=0) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/librabbitmq-2.0.0-py3.6-macosx-10.6-intel.egg/librabbitmq/init.py",
line 227, in drain_events
self._basic_recv(timeout) SystemError: returned a result with an error set
This library is not recommended to use as rabbitmq broker with celery. Instead please try py-amqp. this is more maintained and less buggy.

I have the following error. How to fix the following certificate error (ipython)?

I'm getting the following error when I want to run ipython notebook on my macbook. Does anyone know how to fix this? Could you please help me about it?
ERROR:root:Exception in I/O handler for fd 6
Traceback (most recent call last):
File "//anaconda/lib/python2.7/site-packages/zmq/eventloop/ioloop.py", line 346, in start
self._handlers[fd](fd, events)
File "//anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 167, in accept_handler
callback(connection, address)
File "//anaconda/lib/python2.7/site-packages/tornado/tcpserver.py", line 217, in _handle_connection
do_handshake_on_connect=False)
File "//anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 407, in ssl_wrap_socket
return ssl.wrap_socket(socket, **dict(context, **kwargs))
File "//anaconda/python.app/Contents/lib/python2.7/ssl.py", line 387, in wrap_socket
ciphers=ciphers)
File "//anaconda/python.app/Contents/lib/python2.7/ssl.py", line 141, in __init__
ciphers)
SSLError: [Errno 336445449] _ssl.c:368: error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib
ERROR:root:Exception in I/O handler for fd 6
Traceback (most recent call last):
File "//anaconda/lib/python2.7/site-packages/zmq/eventloop/ioloop.py", line 346, in start
self._handlers[fd](fd, events)
File "//anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 167, in accept_handler
callback(connection, address)
File "//anaconda/lib/python2.7/site-packages/tornado/tcpserver.py", line 217, in _handle_connection
do_handshake_on_connect=False)
File "//anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 407, in ssl_wrap_socket
return ssl.wrap_socket(socket, **dict(context, **kwargs))
File "//anaconda/python.app/Contents/lib/python2.7/ssl.py", line 387, in wrap_socket
ciphers=ciphers)
File "//anaconda/python.app/Contents/lib/python2.7/ssl.py", line 141, in __init__
ciphers)
SSLError: [Errno 336445449] _ssl.c:368: error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib
It appears that your browser is attempting to access the notebook without SSL. Make sure to access the site with HTTPS. For example, when you access the notebook, type in https://127.0.0.1:9999 in your browser. (Or whatever the address of the server is.)
It doesn't recognise the files you're passing it - either:
pass a .pem file (private key) to --NotebookApp.keyfile= and the .crt file (your certificate) to --NotebookApp.certfile=
create a new file by appending your certificate to your key and pass this new file to --certfile.

gsutil CONFIG_REQUIRED import error?

I tried to install and run gsutil and am getting the following error:
Traceback (most recent call last):
File "/Users/groovebug/gsutil/gsutil", line 88, in <module>
sys.exit(gslib.__main__.main())
File "/Users/groovebug/gsutil/gslib/__main__.py", line 93, in main
command_runner = CommandRunner(config_file_list)
File "/Users/groovebug/gsutil/gslib/command_runner.py", line 102, in __init__
self.command_map = self._LoadCommandMap()
File "/Users/groovebug/gsutil/gslib/command_runner.py", line 112, in _LoadCommandMap
__import__('gslib.commands.%s' % module_name)
File "/Users/groovebug/gsutil/gslib/commands/disablelogging.py", line 18, in <module>
from gslib.command import CONFIG_REQUIRED
ImportError: cannot import name CONFIG_REQUIRED
I reinstalled and continued to get it, and haven't found anyone solving it elsewhere.
gsutil no longer uses that variable. If you update to the latest version of gsutil this problem should no longer happen:
gsuil update
CONFIG_REQUIRED is just a constant name for a key used in a dictionary.
If you open ${Directory_Containing_gsutil}/gsutil/gslib/command.py
and add the line
CONFIG_REQUIRED = 'config_required'
it solves the problem. Not sure why that line is missing.

sublime text 2 phpcs plugin python error

I am using Sublime Text 2 with some plugins. I can't seem to work with the Phpcs plugin, because after saving the file, it gives me an ugly error:
Writing file /Applications/XAMPP/xamppfiles/htdocs/myProject/application/libraries/Authentication.php with encoding UTF-8
Exception in thread Thread-15:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "./phpcs.py", line 398, in run
File "./phpcs.py", line 128, in get_errors
File "./phpcs.py", line 194, in execute
File "./phpcs.py", line 197, in parse_report
File "./phpcs.py", line 149, in shell_out
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 623, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1141, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I have also tried to look into the respective files, but I don't know python at all so I don;t know what to do :-/
Could You please help ?
I ended up using SublimeLinter plugin that provides the showing-potential-errors feature that I wanted from the phpcs plugin.
The plugin is located in THIS GITHUB REPO.
Hope this helps anybody who is having a problem using the phpcs library.
#daniel: Thanks for help

Doxyclean Error

I'm trying to run doxyclean but can't get it to work, any help would be appreciated...
I'm running from terminal :
./doxyclean.py --input=./xml/ --output=./clean/ --name="MyProject" --phone -v
I have my doxygen xml in the folder xml, in the same directory as doxyclean.py
The result is :
Checking arguments
Cleaning XML files:
Traceback (most recent call last):
File "./doxyclean.py", line 1220, in <module>
sys.exit(main())
File "./doxyclean.py", line 1171, in main
cleanXML(filePath, xmlOutputDirectory)
File "./doxyclean.py", line 93, in cleanXML
if not fileIsDocumented(filePath):
File "./doxyclean.py", line 62, in fileIsDocumented
originaldoc = minidom.parse(filePath)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/dom/expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 17, column 155
thanks
did you try other ways, my suggestions
use different version of doxyclean
change the arguments to different style, maybe give full paths to the folders.
./doxyclean.py -i Users/xxx/doxyclean/xml/ -o ./clean/ -p
regenerate xml from doxygen
doxyclean works fine. I got this error too and I tried my suggestion 2 and it worked.