I need to resolve a list of coords to geocode, but after call GMGeoCode1.Geocode() function for a while, it returns error executing script line 243, char 21, length is null or not an object.
I have isolated that function so I am able to get some control and wait for the response - GMGeoCode1AfterGetData procedure. I cannot see if it´s because of one of the coords to invalid and raises that exception.
Is there any clever way to get in batch mode? If I need to loop how could I proceed?
Regards!
Related
In a lot of the task flow jobs I'm running, I constantly am getting the
FR_3085 ERROR: Row [1]: 2-th character is a null character, which is
not allowed in a text input file
error. These occur usually in data synchronization tasks but I sometimes see this in mapping configurations as well. How do I resolve this error?
This error occurs when you have NULL characters in your flat file.
One way for doing this is using the OS utilities for removing the NULL characters from your flat file automatically and this will depend on what OS you're using.
I've been running a program located here:
https://github.com/dennybritz/cnn-text-classification-tf
and the base code works fine with the posted example. But, I tried to split new data into a train/test split and then it gives me errors. The program trains on the train data I give it, but come evaluation time I get this error:
Traceback (most recent call last):
File "./eval.py", line 81, in correct_predictions = float(sum(all_predictions == y_test))
TypeError: 'bool' object is not iterable`
From the eval.py code I located where the problem is in this loop:
for x_test_batch in batches:
batch_predictions = sess.run(predictions, {input_x: x_test_batch, dropout_keep_prob: 1.0})
all_predictions = np.concatenate([all_predictions, batch_predictions])
Wherein sess.run returns nothing and batch_predictions becomes an empty array, leading to a value error later on. Also of note:
batch_predictions is always empty.
x_test_batch is non-empty for every batch.
all_predictions is also always empty.
I brought up the issue with the github owner but he recommended I trace through execution. This is my first time using Tensorflow and I am unable to access their website. If anyone can
Tell me what my issue is
or
Tell me how to trace through the graph execution to find it
I would be endlessly appreciative. Thank you to anyone who reads this!
you say sess.run does not return anything, perhaps you could print x_test_batch before running sess.run and look whats inside, perhaps its empty, which is not your intention i think
I have a C++ function running on a single thread.
For example;
function()
{
Line 1; commit(ms sql)
Line 2; commit(oracle)
}
This function needs to complete fully.
I want to know if, in the event someone kills the process from task manager, there is a way to prevent the application from breaking in between line 1 and line 2.
If 1 executes then 2 has to do so as well.
Is this possible and if so, what is the best way to achieve this?
Thanks in advance,
There is no way to achieve this. If the kernel decides your process should die, your process dies.
if Line 1 and 2 are modify some data structure.
may be, you need some form of transaction mechanism.
you can, for example :
include Line 1 and 2 in one database transaction.
make Line 1 and 2 modify some temporary data struct ,
and use a atomic instruction like cas to commit temporary
data to final data struct.
I've got a fairly simple USB HID device that I've been trying to figure out how to read from and write to using Python. I've been able to read from it using PyWinUSB, but the problem comes in when I try to write to it. Trying to write to it makes things explode.
For example:
device = hid.HidDeviceFilter(vendor_id = 0x0003, product_id = 0x1001).get_devices()[0]
This works fine. Then for reading raw data, which is all that I care about right now (I'll work with that once I can figure out how to write to the cursed thing):
def readData(data):
print(data)
return None
This works fine (in fact, it was quite exciting when I got to see it work). So I would assign the data handler like so:
device.set_raw_data_handler(readData)
And every time I hit a button, it's fine. The data comes through as you would expect. Which is great!
The problem comes when I want to write to the device.
Following the sample simple_send file as a template (which was probably not the best choice), I would do the following:
report = device.find_output_reports()[0]
Which would return a report object with a dictionary holding 4 entries. Is that correct? Do you write to a device using the output_reports object? Trying to do so by setting the report value to ANYTHING:
report[<key>] = "pneumonoultramicroscopicvolcanoconiosis"
report.send()
This would keep returning some obnoxious error that I can't interpret:
Traceback (most recent call last):
File "<pyshell#21>", line 1, in <module>
report.send()
File "C:\Python27\lib\site-packages\pywinusb-0.3.1-py2.7.egg\pywinusb\hid\core.py", line 1446, in send
self.__prepare_raw_data()
File "C:\Python27\lib\site-packages\pywinusb-0.3.1-py2.7.egg\pywinusb\hid\core.py", line 1401, in __prepare_raw_data
byref(self.__raw_data), self.__raw_report_size) )
File "C:\Python27\lib\site-packages\pywinusb-0.3.1-py2.7.egg\pywinusb\hid\winapi.py", line 382, in __init__
raise helpers.HIDError("hidP error: %s" % self.error_message_dict[error_code])
HIDError: hidP error: data index not found
I'm using Windows 7. I've managed to find (finally) a reference for the HID DLL exported functions, and I don't HAVE to (or, for that matter even really WANT to) use the PyWinUSB library. I just want to make this work, and it didn't seem like it would be that tough, but it has been.
Can someone tell me what it is I've been doing wrong here?
Thanks.
Also, I tried tracing the error call, and made it so far before the program just closed which was kind of disheartening.
i made it work with this
buffer= [0xFF]*33 # 33 = report size + 1 byte (report id)
buffer[0]=0x0 # report id
buffer[1]=0xFE
buffer[2]=0x00
buffer[3]=0xFF
out_report.set_raw_data(buffer)
out_report.send()
dev.close()
For me worked only this:
report.send([0x70, ..., 0x73 ])
The function call sequence with set_raw_data([0x70, ..., 0x73) and subsequent send() didn't work for me.
I am using QSettings to try and figure out if an INI is valid.(using status() to check) I made a purposefully invalid INI file and loaded it in. The first time the code is called, it returns invalid, but every time after that, it returns valid. Is this a bug in my code?
It's a Qt bug caused by some global state. Note that the difference in results happens whether or not you call delete on your QSettings object, which you should. Here's a brief summary of what happens on the first run:
The result code is set to NoError.
A global cache is checked to see if your file is present
Your file isn't present the first time, so it's parsed on qsettings.cpp line 1530 (Qt-4.6.2)
Parsing results in an error and the result code is set (see qsettings.cpp line 1552).
The error result code is returned.
And the second run is different:
The result code is set to NoError.
A global cache is checked, your file is present.
The file size and timestamp are checked to see if the file has changed (see qsettings.cpp line 1424).
The result code is returned, which happens to be NoError -- the file was assumed to have been parsed correctly.
Checked your code, you need to delete the file object before returning.
Apart from that, your code uses the QSettings::QSettings(fileName, format) c'tor to open an ini-file. That call ends in the function QConfFile::fromName (implemented in qsettings.cpp). As I read it (there are a few macros and such that I decided not to follow), the file is not re-opened if the file already is open (i.e. you have not deleted the object since the last time). Thus the status will be ok the second time around.