I'm posting this question (and answer) so if anybody else has this problem in the future, you'll be able to google it.
If you are trying to run celeryd in Django like so:
python manage.py celeryd
You can receive the following error immediately after it has started:
celery#eric-desktop-dev has started.
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
<... snip ...>
File "/usr/local/lib/python2.6/dist-packages/amqplib-0.6.1-py2.6.egg/amqplib/client_0_8/connection.py", line 134, in __init__
self._x_start_ok(d, login_method, login_response, locale)
File "/usr/local/lib/python2.6/dist-packages/amqplib-0.6.1-py2.6.egg/amqplib/client_0_8/connection.py", line 704, in _x_start_ok
args.write_longstr(response)
File "/usr/local/lib/python2.6/dist-packages/amqplib-0.6.1-py2.6.egg/amqplib/client_0_8/serialization.py", line 352, in write_longstr
self.write_long(len(s))
TypeError: object of type 'NoneType' has no len()
A rather cryptic error message, with no real clue as to where to go to fix the problem. See below for the answer so you don't waste a bunch of time on this error like I did today :)
You're missing a celery setting in settings.py. In my case it was caused by a typo (I missed an 'S' in BROKER_PASSWORD). Double check you included all the required settings and that each one is spelled everything correctly, and you'll avoid making as ass of yourself like I did today :)
Related
Upon running python craft migration create_a_table --create a_table I received the following traceback:
Traceback (most recent call last):
File "SOMEPATH\craft", line 8, in <module>
from wsgi import application
File "SOMEPATH\wsgi.py", line 11, in <module>
application.register_providers(Kernel, ApplicationKernel)
File "SOMEPATH\venv\lib\site-packages\masonite\foundation\Application.py", line 32, in register_providers
provider.register()
File "SOMEPATH\Kernel.py", line 29, in register
self.register_routes()
File "SOMEPATH\Kernel.py", line 72, in register_routes
Route.group(
File "SOMEPATH\venv\lib\site-packages\masonite\routes\Route.py", line 166, in group
middleware = route.list_middleware
AttributeError: 'NoneType' object has no attribute 'list_middleware'
I've had a check with the debugger and for some reason it seems that the routes don't get loaded from the routes/web.py file is there something I am missing here
It turns out that one of the dependencies I had somewhere had a missing dependency. I found out that the load function called in Kernel.register_routes silenced a ModuleNotFoundError. For some reason this error didn't get silenced in a fresh project that also was missing a dependency of a module. I am guessing that it is something to do with the configuration I have on this project.
For someone else that also has this error, using a debugger, set a breakpoint in masonite\utils\structures.py in the load function after except Exception as e: and you can read out the exception message to see what module is missing
Hi I have managed to install Ceph Octopus 15.2.4 and python Python 3.6.8 on CentOS Linux release 8.2.2004.
Cluster health is Good. However, when I try configure the zabbix module using steps in this
https://docs.ceph.com/en/latest/mgr/zabbix/
I get
Error EINVAL: Traceback (most recent call last):
File "/usr/share/ceph/mgr/mgr_module.py", line 1167, in _handle_command
return self.handle_command(inbuf, cmd)
File "/usr/share/ceph/mgr/zabbix/module.py", line 407, in handle_command
return 0, json.dumps(self.config, index=4, sort_keys=True), ''
File "/lib64/python3.6/json/__init__.py", line 238, in dumps
**kw).encode(obj)
TypeError: __init__() got an unexpected keyword argument 'index'
I checked the template and it looks to be latest.
Not sure what seems to be the issue here.
Regards,
j
This problem is typo bug.
https://github.com/ceph/ceph/commit/0e9303d0599c92e575aae7acca87328ed8ee9527
This one has a bad typo in it! It should be "indent=4", not "index=4"!
But, this problem is not fixed in 15.2.5.
I have a few twitterbots that I run on my raspberryPi. I have most functions wrapped in a try / except to ensure that if something errors it doesn't break the program and continues to execute.
I'm also using Python's Streaming library as my source of monitoring for the tags that I want the bot to retweet.
Here is an issue that happens that kills the program although I have the main function wrapped in a try/except:
Unhandled exception in thread started by <function startBot5 at 0x762fbed0>
Traceback (most recent call last):
File "TwitButter.py", line 151, in startBot5
'<botnamehere>'
File "/home/pi/twitter/bots/TwitBot.py", line 49, in __init__
self.startFiltering(trackList)
File "/home/pi/twitter/bots/TwitBot.py", line 54, in startFiltering
self.myStream.filter(track=tList)
File "/usr/local/lib/python3.4/dist-packages/tweepy/streaming.py", line 445, in filter
self._start(async)
File "/usr/local/lib/python3.4/dist-packages/tweepy/streaming.py", line 361, in _start
self._run()
File "/usr/local/lib/python3.4/dist-packages/tweepy/streaming.py", line 294, in _run
raise exception
File "/usr/local/lib/python3.4/dist-packages/tweepy/streaming.py", line 263, in _run
self._read_loop(resp)
File "/usr/local/lib/python3.4/dist-packages/tweepy/streaming.py", line 313, in _read_loop
line = buf.read_line().strip()
AttributeError: 'NoneType' object has no attribute 'strip'
My setup:
I have a parent class TwitButter.py, that creates an object from the TwitBot.py. These objects are the bots, and they are started on their own thread so they can run independently.
I have a function in the TwitBot that runs the startFiltering() function. It is wrapped in a try/except, but my except code is never triggered.
My guess is that the error is occurring within the Streaming library. Maybe that library is poorly coded and breaks on the line that is specified at the bottom of the traceback.
Any help would be awesome, and I wonder if others have experienced this issue?
I can provide extra details if needed.
Thanks!!!
This actually is problem in tweepy that was fixed by github #870 in 2017-04. So, should be resolved by updating your local copy to latest master.
What I did to discover that:
Did a web search to find the tweepy source repo.
Looked at streaming.py for context on the last traceback lines.
Noticed the most recent change to the file was the same problem.
I'll also note that most of the time you get a traceback from deep inside a Python library, the problem comes from the code calling it incorrectly, rather than a bug in the library. But not always. :)
I am new to jira-python and have run into an issue with using jirashell.
jira-python was installed from documentation given here: http://jira.readthedocs.org/en/latest/
When I try to start jirashell using:
ubuntu#ip-10-0-0-12:~$ jirashell -s https://jira.atlassian.com
I get the following error:
Traceback (most recent call last):
File "/usr/local/bin/jirashell", line 11, in <module> sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/jira/jirashell.py", line 248, in main
jira = JIRA(options=options, basic_auth=basic_auth, oauth=oauth)
File "/usr/local/lib/python2.7/dist-packages/jira/client.py", line 202, in __init__self._create_oauth_session(oauth)
File "/usr/local/lib/python2.7/dist-packages/jira/client.py", line 1871, in _create_oauth_session
oauth['consumer_key'],
KeyError: u'consumer_key'
I have also tried to get to a server using basic auth but that returns the same error. Using curl works fine, but I wanted to see the objects that are getting returned and get help as I develop by python-jira integration.
Thank you for any insight.
I am trying to run the example file provided here : http://git.videolan.org/?p=vlc/bindings/python.git;a=tree;f=examples;hb=HEAD (the qtvlc example).
It gives me the following error :
$>c:\Python27_32b\python.exe examples_qtvlc.py "test_file.mov"
Traceback (most recent call last):
File "examples_qtvlc.py", line 114, in PlayPause
self.OpenFile()
File "examples_qtvlc.py", line 153, in OpenFile
self.MediaPlayer.set_hwnd(self.VideoFrame.winId())
File "vlc.py", line 2126, in set_hwnd
return libvlc_media_player_set_hwnd(self, drawable)
File "vlc.py", line 4263, in libvlc_media_player_set_hwnd
return f(p_mi, drawable)
ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>: wrong type
Traceback (most recent call last):
File "examples_qtvlc.py", line 192, in <module>
sys.exit(app.exec_())
It doesn't give me the error when I run the program, it gives it when I choose a .mov file from the "play" button in the interface.
Btw, if I try to play an .avi file it plays it, but in another window and it gives a "No accelerated IMDCT transform found".
The thing is I really need to be able to play .mov files, it is the only reason I am using the vlc module instead of Phonon available with PyQt.
I was having the same error when I tried to use the vlc module in my code so I thought I was doing something wrong. But if the example file is not working I guess there is something wrong in my config rather than my code. What can cause this error ?
EDIT :
I didn't notice, but if i click "play" again after choosing the file (and getting the error), the file does play... outside of the window.. The problem is that I don't have any control in this new window where the video plays.. What do I have to do to get it to play inside the application ?
The second thing is that I get the following error (repeating as the video plays)
[075e5654] main subpicture error: blending YUVA to J422 failed
I don't know if it important or not ...
SOLVED :
For those who would be interested, I casted the
self.VideoFrame.winId()
as an int and it seems to be doing what I want
Thanks for those who took the time to read this question..