Skip to content

Commit 2c01bca

Browse files
committed
Add pandas import (unused) because of some incompatiblity of this library
If pandas is imported after some other libraries, the operation fails https://askubuntu.com/questions/1081651/failing-to-import-pandas-in-anjuta-module-functions-cannot-set-meth-class-or-me pandas-dev/pandas#23040
1 parent f185949 commit 2c01bca

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

supersaop/src/ccu_bridge.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/usr/bin/env python3
2+
3+
# import pandas to workaround issue when pandas is imported after some other libraries
4+
# https://github.com/pandas-dev/pandas/issues/23040
5+
import pandas
6+
27
import datetime
38
import logging
49
import re

supersaop/src/hmi.py

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2525
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626

27+
# import pandas to workaround issue when pandas is imported after some other libraries
28+
# https://github.com/pandas-dev/pandas/issues/23040
29+
import pandas
30+
2731
import collections
2832
import datetime
2933
import logging
@@ -134,6 +138,7 @@ def on_wildfire_map_observed(self, uav: str, wildfire_map_observed_msg: Wildfire
134138
self.wildfire_map_observed = serialization.geodata_from_raster_msg(
135139
wildfire_map_observed_msg.raster,
136140
"ignition")
141+
self.wildfire_map_observed.data['ignition'] = self.wildfire_map_observed.data['ignition']*60.
137142
self.wildfire_map_observed = self.wildfire_map_observed.subset(
138143
Area(self.elevation_map.x_offset,
139144
self.elevation_map.x_offset + self.elevation_map.cell_width * self.elevation_map.max_x,

supersaop/src/observation_planning.py

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2525
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626

27+
# import pandas to workaround issue when pandas is imported after some other libraries
28+
# https://github.com/pandas-dev/pandas/issues/23040
29+
import pandas
30+
2731
import datetime
2832
import logging
2933
import threading

supersaop/src/situation_assessment.py

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2525
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626

27+
# import pandas to workaround issue when pandas is imported after some other libraries
28+
# https://github.com/pandas-dev/pandas/issues/23040
29+
import pandas
30+
2731
import datetime
2832
import logging
2933
import threading

0 commit comments

Comments
 (0)