Hi All, Any ideas on the meaning of this error message: Error Type: TypeError Error Value: keyword parameter redefined It is raised at line 77, /lib/python/Products/PythonScripts/zbytecodehacks/inline.py The line of code that raises it is a call to a ZSQL method: logfile_line_id = context.sqlStreamInsertIntoRealRaw(eventId = eventId, client_ip_address = client_ip_address, timestamp = timestamp, get_filename = get_filename, protocol_and_version = protocol_and_version, http_status_code = http_status_code, bytes_sent = bytes_sent, platform = platform, version = version, client = client, type = type, distribution = distribution, language = language, cpu = cpu, client_guid = client_guid, stat1_packets_received = stat1_packets_received, stat1_out_of_order = stat1_out_of_order, stat1_missing = stat1_missing, stat1_early = stat1_early, stat1_late = stat1_late, stat1_audio_format = stat1_audio_format, stat2_bandwidth = stat2_bandwidth, stat2_available = stat2_available, stat2_highest = stat2_highest, stat2_lowest = stat2_lowest, stat2_average = stat2_average, stat2_requested = stat2_requested, stat2_received = stat2_received, stat2_late = stat2_late, stat2_rebuffering = stat2_rebuffering, stat2_transport = stat2_transport, stat2_startup = stat2_startup, stat2_format = stat2_format, stat3_string = stat3_string, file_size = file_size, file_time = file_time, sent_time = sent_time, resends = resends, failed_resends = failed_resends, sc_realaudio = sc_realaudio, sc_realvideo = sc_realvideo, sc_event = sc_event, sc_image_maps = sc_image_maps, start_time = start_time, server_address = server_address, average_bitrate = average_bitrate, packets_sent = packets_sent, presentation_id = presentation_id) TIA, Troy
"Farrell, Troy" wrote:
Error Type: TypeError Error Value: keyword parameter redefined
A simple example of when you get this: def x(y,z): print y,z
x(2,y=1) Traceback (innermost last): File "<stdin>", line 1, in ? TypeError: keyword parameter redefined
logfile_line_id = context.sqlStreamInsertIntoRealRaw(eventId = eventId, <snip> presentation_id)
Aaaaagh! For your own sanity, please consider building up a dictionary: request = {} request['eventId'] = ... ...etc... And then call your ZSQL method like: logfile_line_id = context.sqlStreamInsertIntoRealRaw(request) ...you'll probably find you remove the above error that way and your code will be a _lot_ more readable ;-) cheers, Chris
participants (2)
-
Chris Withers -
Farrell, Troy