如何将LP\u LP\u c\u longlong实例从指针转换为LP\u c\u longlong

2024-09-28 22:06:02 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用pythonrtree模块通过lat,lon查找最近的城市。但在Nginx服务器上,在几个请求之后,我得到了以下错误。你知道吗

它在apache上运行良好,但在ngix上给出参数错误

File "/home/ubuntu/core/greedy/utilities.py", line 88, in current_location
    city = GeoLocation.CityByLatLong(location[0], location[1], idx)

  File "/home/ubuntu/core/greedy/apps/geolocations/models.py", line 13, in CityByLatLong
    near_list = idx.nearest((latitude, longitude), 1, objects=False)

  File "/usr/local/lib/python2.7/dist-packages/rtree/index.py", line 567, in nearest
    p_num_results)

ArgumentError: argument 5: <type 'exceptions.TypeError'>: expected LP_LP_c_longlong instance instead of pointer to LP_c_longlong

Tags: inpycorehomeubuntu错误linelocation