Any chance I could get a tip on how to debug this error in the volttron.log file? 'Subsystems' object has no attribute 'rcp' what does this mean?
Traceback:
Traceback (most recent call last):
File "/var/lib/volttron/volttron/platform/vip/agent/core.py", line 117, in _loop
method(*self.args, **self.kwargs)
File "/home/volttron/.volttron/agents/4f27247d-e6bf-4e30-8ffe-6d895ac52047/setteroccvavagent-0.1/setteroccvav/agent.py", line 222, in raise_setpoints_up
result = self.vip.rcp.call('platform.actuator', 'set_multiple_points', self.core.identity, topic_values).get(timeout=30)
AttributeError: 'Subsystems' object has no attribute 'rcp'
My agent code with the function running:
# now we can send our set_multiple_points request, use the basic form with our additional params
result = self.vip.rcp.call('platform.actuator', 'set_multiple_points', self.core.identity, topic_values).get(timeout=3)
This is a gist of my agent code.
This is a typo, now fixed in the original post.
result = self.vip.rpc.call('platform.actuator', 'set_multiple_points', self.core.identity, topic_values).get(timeout=3)
Related
Hey guys I'm having trouble figuring this out:
Traceback (most recent call last):
File "SOLIS.py", line 62, in <module>
com_df1 = scraper.comments(sub_id_list,keywords1,keywords2)
File "/Users/CarranzaEE/Desktop/CDS 491:DEXIS/Reddit_SOLIS/Reddit_SOLIS.py", line 252, in comments
if((comment.author is None) or (hasattr(comment.author, 'id') != True)):
File "/Users/CarranzaEE/anaconda3/lib/python3.7/site-packages/praw/models/reddit/base.py", line 34, in __getattr__
self._fetch()
File "/Users/CarranzaEE/anaconda3/lib/python3.7/site-packages/praw/models/reddit/redditor.py", line 171, in _fetch
data = self._fetch_data()
File "/Users/CarranzaEE/anaconda3/lib/python3.7/site-packages/praw/models/reddit/redditor.py", line 168, in _fetch_data
return self._reddit.request("GET", path, params)
File "/Users/CarranzaEE/anaconda3/lib/python3.7/site-packages/praw/reddit.py", line 765, in request
json=json,
File "/Users/CarranzaEE/anaconda3/lib/python3.7/site-packages/prawcore/sessions.py", line 339, in request
url=url,
File "/Users/CarranzaEE/anaconda3/lib/python3.7/site-packages/prawcore/sessions.py", line 265, in _request_with_retries
raise self.STATUS_EXCEPTIONS[response.status_code](response)
prawcore.exceptions.NotFound: received 404 HTTP response
This error happens when I try to use author (an instance of Redditor) to try and call author.id. PRAW documents also say that Shadowbanned accounts are treated the same as non-existent accounts, meaning that they will not have any attributes, and that will only return name and is_suspended.
But is_suspended is no longer an attribute provided by reddit api. So I'm having trouble trying to handle cases where the account is a shawdowbanned account. Any tips or ideas?
I want to enable slowmode via a command, in the form as >slowmode <seconds>, like >slowmode 10. My current code:
#has_permissions(manage_channels=True)
async def slowmode(ctx, amount):
await ctx.channel.edit.slowmode.delay(int(amount))
and I get this error:
Ignoring exception in command slowmode:
Traceback (most recent call last):
File "C:\Users\dante\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 83, in wrapped
ret = await coro(*args, **kwargs)
File "C:\Users\dante\Desktop\Utilly\Utilly.py", line 116, in slowmode
await ctx.channel.edit.slowmode.delay(int(amount))
AttributeError: 'function' object has no attribute 'slowmode'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\dante\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\bot.py", line 892, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\dante\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 797, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\dante\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 92, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'function' object has no attribute 'slowmode'
Use discord.TextChannel.edit(slowmode_delay=amount)
#has_permissions(manage_channels=True)
async def slowmode(ctx, amount):
try:
await ctx.channel.edit(reason='Bot Slowmode Command', slowmode_delay=int(amount))
except discord.Errors.Forbidden:
await ctx.send('I do not have the permission to do this, please try again')
I've used Wagtail's ModelAdmin on a few other projects with great success, but this is the first time I'm attempting to use it with a model inheriting from Page.
I copied the simple example template and removed the parts that didn't relate to my BlogPageModel.
The link to the ModelAdmin appears as expected, but when I click it, I get TemplateDoesNotExist at /admin/blog/blogpage/.
I don't remember having to set up a template before. Is there a setting I'm missing?
Wagtail: 1.9 /
Django: 1.10.5 /
Python: 3.5.2
Update: I tried it with a model that inherits from models.Model as well with the same result.
Traceback follows:
Internal Server Error: /admin/blog/blogpage/
Traceback (most recent call last):
File "/Users/username/.virtualenv/lib/python3.5/site-packages/django/core/handlers/exception.py", line 39, in inner
response = get_response(request)
File "/Users/username/.virtualenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
response = self._get_response(request)
File "/Users/username/.virtualenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 217, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/username/.virtualenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 215, in _get_response
response = response.render()
File "/Users/username/.virtualenv/lib/python3.5/site-packages/django/template/response.py", line 109, in render
self.content = self.rendered_content
File "/Users/username/.virtualenv/lib/python3.5/site-packages/django/template/response.py", line 84, in rendered_content
template = self.resolve_template(self.template_name)
File "/Users/username/.virtualenv/lib/python3.5/site-packages/django/template/response.py", line 66, in resolve_template
return select_template(template, using=self.using)
File "/Users/username/.virtualenv/lib/python3.5/site-packages/django/template/loader.py", line 53, in select_template
raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
django.template.exceptions.TemplateDoesNotExist: modeladmin/blog/blogpage/index.html, modeladmin/blog/index.html, modeladmin/index.html
[21/Feb/2017 07:56:38] "GET /admin/blog/blogpage/ HTTP/1.1" 500 110901
I suspect you've missed out adding 'wagtail.contrib.modeladmin' to INSTALLED_APPS.
I am trying to deploy ovf using pyVmomi. I am trying to follow this example: https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/deploy_ovf.py.
There are two VCenter setups and there are differences. On one VCenter, I can deploy the VM. On the other, I have a failure as below:
>>> spec_result = manager.CreateImportSpec(ovfd, rp_obj, datastore_obj,spec_params)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/aitang/virenvs/py343/lib/python3.4/site-packages/pyVmomi/VmomiSupport.py", line 570, in <lambda>
self.f(*(self.args + (obj,) + args), **kwargs)
File "/Users/aitang/virenvs/py343/lib/python3.4/site-packages/pyVmomi/VmomiSupport.py", line 376, in _InvokeMethod
return self._stub.InvokeMethod(self, info, args)
File "/Users/aitang/virenvs/py343/lib/python3.4/site-packages/pyVmomi/SoapAdapter.py", line 1350, in InvokeMethod
raise obj # pylint: disable-msg=E0702
pyVmomi.VmomiSupport.InvalidType: (vmodl.fault.InvalidType) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = '',
faultCause = <unset>,
faultMessage = (vmodl.LocalizableMessage) [],
argument = 'ManagedObjectReference'
}
Can someone point to the way on how I can troubleshoot this error? I tried to look at what this function does but couldn't find it.
I tried to set pdb trace, and it turns out that the reason it fails is that this comes back with a 500 response. On the VCenter that worked, it returns a 200 response. So why would the same call return differently?
I used the wrong datastore. The one I used was not of type "Datastore":
>>> type(datastore_obj)
<class 'pyVmomi.VmomiSupport.vim.StoragePod'>
When I used one of its childEntity, it worked:
>>> type(datastore_obj.childEntity[0])
<class 'pyVmomi.VmomiSupport.vim.Datastore'>
Here is what helped with debugging: I put a breakpoint in SoapAdapter.py. When 500 is returned to me, it entered pdb, and I obtained my own request, which contained this line at the bottom:
<datastore type="StoragePod">datastore-1</datastore>
When I compared this with the other VCenter that worked, I saw this difference:
<datastore type="Datastore">datastore-10</datastore>
When using the asynchronous URL Fetch I get intermittent errors like this:
For 300 fetches I'm getting about 20 of theses. Am I doing something wrong? Or is this a bug?
Traceback (most recent call last):
File "/base/data/home/apps/s~culturemap-bulkmail/1.368407357562484358/bulkmail/views.py", line 83, in mailer
emailer.send(email, context)
File "/base/data/home/apps/s~culturemap-bulkmail/1.368407357562484358/bulkmail/mailers/amazon.py", line 91, in send
self.connection.send(email, msg.message().as_string())
File "/base/data/home/apps/s~culturemap-bulkmail/1.368407357562484358/bulkmail/mailers/amazon.py", line 49, in send
headers=self.headers,
File "/python27_runtime/python27_lib/versions/1/google/appengine/api/urlfetch.py", line 339, in make_fetch_call
rpc.make_call('Fetch', request, response, _get_fetch_result, allow_truncated)
File "/python27_runtime/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 519, in make_call
assert self.__rpc.state == apiproxy_rpc.RPC.IDLE, repr(self.state)
AssertionError: 2
in init:
self.fetcher = urlfetch.create_rpc(deadline=60)
in method that gets called several times:
also line that errors out:
fetch = urlfetch.make_fetch_call(
self.fetcher,
'https://email.us-east-1.amazonaws.com/',
payload=form_data,
method=urlfetch.POST,
headers=self.headers,
)
I guess I should create a new rpc instead of reusing it?
Show some of your code, from the error it looks like you're reusing an existing active RPC object.