I've currently started using the AwesomeWM and started configuring it. I struggle at theming: whenever I try to change the theme, I get this error message:
https://i.stack.imgur.com/vAbuW.png
It tells me that the error is on the line 553/554, but if I don't adjust any themes, they work without any errors.
Code for theming:
local theme_path = string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), "powerarrow")
beautiful.init(theme_path)
Lines the error says are wrong (553/554):
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
So, what's the problem?
Related
I am trying to use the biomaRt package to access the data from Ensembl, however I got error message when using the useDataset() function. My codes are shown below.
library(httr)
listMarts()
ensembl = useMart("ENSEMBL_MART_ENSEMBL")
listDatasets(ensemble)
ensembl = useDataset("hsapiens_gene_ensembl",mart = ensemble)
When I type useDataset function i got error message like this:
> ensembl = useDataset("hsapiens_gene_ensembl",mart = ensembl)
Ensembl site unresponsive, trying asia mirror
Error in textConnection(text, encoding = "UTF-8") :
invalid 'text' argument
and sometimes another different error message showed as:
> ensembl = useDataset("hsapiens_gene_ensembl",mart = ensembl)
Ensembl site unresponsive, trying asia mirror
Error in textConnection(bmResult) : invalid 'text' argument
it seems like that the mirror automatically change to asia OR useast OR uswest, but the error message still shows up over and over again, and i don't know what to do.
So if anyone could help me with this? I will be very grateful for any help or suggestion.
Kind regards Riley Qiu, Dongguan, China
I'd like to compute the travel time between two points. So I use the RoutingApi from herepy library (as reported in the example at https://github.com/abdullahselek/HerePy/blob/master/examples/routing_api.py):
from herepy import (
RoutingApi,
RouteMode,
MatrixRoutingType,
MatrixSummaryAttribute,
RoutingTransportMode,
RoutingMode,
RoutingApiReturnField,
RoutingMetric,
RoutingApiSpanField,
AvoidArea,
AvoidFeature,
Avoid,
Truck,
ShippedHazardousGood,
TunnelCategory,
TruckType,
)
routing_api = RoutingApi(api_key="my_key")
response = routing_api.truck_route(
waypoint_a=[lat_a, lon_a],
waypoint_b=[lat_b, lon_b],
modes=[RouteMode.truck, RouteMode.fastest],
)
print(response.as_dict())
Though, even if my api key is valid and "enabled" on the HERE developer platform, I get the following error message:
HEREError: Error occurred on routing_api __get _route response status code 403
Can anyone explain to me why is this happening and how to solve that? Thank you in advance.
The issue is with coordinates.
Looking at the example at https://github.com/abdullahselek/HerePy/blob/master/examples/routing_api.py
if you try:
response = routing.car_route(waypoint_a=[41.9798, -87.8801], waypoint_b=[41.9043, -87.9216], modes=[herepy.RouteMode.car, herepy.RouteMode.fastest])
print(response.as_dict())
it should work.
I have been trying to use panelOLS regression but I kept on getting errors, I have attached the lines of code and the error.
'mod=PanelOLS(data.FDI,data[['Trade openness','GDP growth']],time_effects=True)'
' res = mod.fit(cov_type='clustered', cluster_entity=True)`
error messages
I am creating a platform game. I was trying to do a platform that went constantly up and down like an elevator, when i got this error: TypeError: 'Sprite' object is not iterable.
Here's the code related to the elevator:
IN SET UP:
self.platform_list = arcade.SpriteList()
self.elevator = arcade.Sprite()
for i in range(600,800,32):
self.elevator =
arcade.Sprite("imagenes/platformer/Ground/dirt_grass.png", SCALE_PLATFORMS)
self.elevator.center_x = i
self.elevator.center_y = 420
self.elevator.change_y = 2
self.platform_list.append(self.elevator)
IN UPDATE:
self.platform_list.update()
for plat in self.elevator :
if plat.center_y > 680 :
plat.change_y = - 2
if plat.center_y < 400 :
plat.change_y = 2
if i change the update by replacing plat for self.elevator, and get rid of the for, only one block of the ones that conform the platform goes up and down, the rest goes up without stoping, and gets out of the screen. I have tried also changing the for by "for self.elevator in self.platform_list" and then changing plat for self.elevator, but when i execute it, all platforms move up and down.
¿How can i fix this? Please help me.
I'm trying to create an app that needs to recursively check an email address for new emails and then do some other stuff; I'm having some problems with the getting the body of the emails, though. I'm using the pyzmail module alongside imapclient, and the Automate the Boring Stuff for guidance (with python 3.6). Here's my code:
mail = imapclient.IMAPClient('imap.gmail.com', ssl=True)
mail.login('email', 'password')
mail.select_folder('INBOX', readonly=False)
uid = mail.gmail_search('NC')
for i in uid:
message = mail.fetch(i, ['BODY[]'], 'FLAGS')
msg = pyzmail.PyzMessage.factory(message[i][b'BODY[]'])
msg.html_part.get_payload().decode(msg.text_part.charset)
But it's not working. I've basically tried different forms of this code but to no avail and there's really not that many examples that can help me along. I'm a bit of a python newbie. Can anybody help?
Thanks,
EDIT
I realized where I made a mistake and fixed a bit of the code:
server = imapclient.IMAPClient('imap.gmail.com', ssl=True)
server.login('p.imagery.serv#gmail.com', 'rabbitrun88ve')
server.select_folder('INBOX', readonly=True)
uids = server.gmail_search('NC')
for i in uids:
messages = server.fetch(i, ['BODY[]'])
msg = pyzmail.PyzMessage.factory(messages[b'BODY[]'])
The problem I'm having is with the last line, which I dont know how to fed using the variables that is created with the iterator. It throws out this message:
ValueError: input must be a string a bytes, a file or a Message
I'm not sure if you still have this problem but for those who might have similar issues in future.
I noticed a little omission in the last line which might be the culprit.
msg = pyzmail.PyzMessage.factory(messages[b'BODY[]'])
You omitted the 'i' variable of the for loop
msg = pyzmail.PyzMessage.factory(messages[i][b'BODY[]'])
I'd like to do next to get body text of searched messages:
server = imapclient.IMAPClient('imap.gmail.com', ssl=True)
server.login('p.imagery.serv#gmail.com', 'rabbitrun88ve')
server.select_folder('INBOX', readonly=True)
uids = server.gmail_search('NC')
rawmessage = server.fetch(uids, ['BODY[]'])
for i in rawmessage:
msg = pyzmail.PyzMessage.factory(rawmessage[i][b'BODY[]'])
msg.html_part.get_payload().decode(msg.text_part.charset)
In this case, you get iteration over fetched emails with body text. I checked similar example but I used text_part.get_payload() instead html regarding features of my server.