Mock Version: 2.2 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target aarch64 --nodeps /builddir/build/SPECS/mapillary_tools.spec'], chrootPath='/var/lib/mock/fedora-rawhide-aarch64-1587134166.718893/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.apux6_v1:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.apux6_v1:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '8d806d8d69994dd9b59aac8f47d9688e', '-D', '/var/lib/mock/fedora-rawhide-aarch64-1587134166.718893/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.apux6_v1:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target aarch64 --nodeps /builddir/build/SPECS/mapillary_tools.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0'} and shell False Building target platforms: aarch64 Building for target aarch64 setting SOURCE_DATE_EPOCH=1586217600 Wrote: /builddir/build/SRPMS/mapillary_tools-0.5.0-1.fc33.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target aarch64 --nodeps /builddir/build/SPECS/mapillary_tools.spec'], chrootPath='/var/lib/mock/fedora-rawhide-aarch64-1587134166.718893/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.apux6_v1:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.apux6_v1:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'a72d5c2d671d4c95992f82e8405e1971', '-D', '/var/lib/mock/fedora-rawhide-aarch64-1587134166.718893/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.apux6_v1:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target aarch64 --nodeps /builddir/build/SPECS/mapillary_tools.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0'} and shell False Building target platforms: aarch64 Building for target aarch64 setting SOURCE_DATE_EPOCH=1586217600 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.S8M5pw + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf mapillary_tools-0.5.0 + /usr/bin/unzip -qq /builddir/build/SOURCES/mapillary_tools-0.5.0.zip + STATUS=0 + '[' 0 -ne 0 ']' + cd mapillary_tools-0.5.0 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + 2to3 -w -n ./ RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No changes to ./setup.py RefactoringTool: Refactored ./bin/download_images.py RefactoringTool: Refactored ./mapillary_tools/__init__.py RefactoringTool: Refactored ./mapillary_tools/apply_camera_specific_config.py RefactoringTool: Refactored ./mapillary_tools/config.py RefactoringTool: Refactored ./mapillary_tools/download.py RefactoringTool: Refactored ./mapillary_tools/edit_config.py --- ./bin/download_images.py (original) +++ ./bin/download_images.py (refactored) @@ -1,6 +1,6 @@ #!/usr/bin/env python -import urllib2 -import urllib +import urllib.request, urllib.error, urllib.parse +import urllib.request, urllib.parse, urllib.error import json import os import shutil @@ -34,18 +34,18 @@ ''' # Create URL - params = urllib.urlencode(zip( + params = urllib.parse.urlencode(list(zip( ['client_id', 'bbox', 'per_page'], [CLIENT_ID, ','.join([str(min_lon), str(min_lat), str( max_lon), str(max_lat)]), str(max_results)] - )) - print(MAPILLARY_API_IM_SEARCH_URL + params) + ))) + print((MAPILLARY_API_IM_SEARCH_URL + params)) # Get data from server, then parse JSON - query = urllib2.urlopen(MAPILLARY_API_IM_SEARCH_URL + params).read() + query = urllib.request.urlopen(MAPILLARY_API_IM_SEARCH_URL + params).read() query = json.loads(query)['features'] - print("Result: {0} images in area.".format(len(query))) + print(("Result: {0} images in area.".format(len(query)))) return query @@ -67,18 +67,18 @@ try: # Get image and save to disk - image = urllib.URLopener() + image = urllib.request.URLopener() image.retrieve(url, path + filename) # Log filename and GPS location coords = ",".join(map(str, im['geometry']['coordinates'])) im_list.append([filename, coords]) - print("Successfully downloaded: {0}".format(filename)) + print(("Successfully downloaded: {0}".format(filename))) except KeyboardInterrupt: break except: - print("Failed to download: {0}".format(filename)) + print(("Failed to download: {0}".format(filename))) return im_list --- ./mapillary_tools/__init__.py (original) +++ ./mapillary_tools/__init__.py (refactored) @@ -1,28 +1,28 @@ -import geo -import processing -import uploader -import config -import exif_aux -import exif_read -import exif_write -import ffprobe -import gps_parser -import upload -import process_user_properties -import process_geotag_properties -import process_sequence_properties -import process_upload_params -import process_import_meta_properties -import insert_MAPJson -import process_video -import gpx_from_gopro -import gpmf -import ffmpeg -import commands -import process_csv -import interpolation -import post_process -import apply_camera_specific_config -import camera_support +from . import geo +from . import processing +from . import uploader +from . import config +from . import exif_aux +from . import exif_read +from . import exif_write +from . import ffprobe +from . import gps_parser +from . import upload +from . import process_user_properties +from . import process_geotag_properties +from . import process_sequence_properties +from . import process_upload_params +from . import process_import_meta_properties +from . import insert_MAPJson +from . import process_video +from . import gpx_from_gopro +from . import gpmf +from . import ffmpeg +from . import commands +from . import process_csv +from . import interpolation +from . import post_process +from . import apply_camera_specific_config +from . import camera_support VERSION = "0.5.0" --- ./mapillary_tools/apply_camera_specific_config.py (original) +++ ./mapillary_tools/apply_camera_specific_config.py (refactored) @@ -1,7 +1,7 @@ def apply_camera_specific_config(vars_args): # Check for Blackvue if "device_make" in vars_args and vars_args['device_make'].lower()=='blackvue' or "geotag_source" in vars_args and vars_args["geotag_source"] == 'blackvue_videos': - from camera_support import prepare_blackvue_videos + from .camera_support import prepare_blackvue_videos vars_args = prepare_blackvue_videos.apply_config_blackvue(vars_args) # Potentially check for other cameras i.e. Garmin return vars_args --- ./mapillary_tools/config.py (original) +++ ./mapillary_tools/config.py (refactored) @@ -1,11 +1,11 @@ import os -import ConfigParser +import configparser def load_config(config_path): config = None if os.path.isfile(config_path): - config = ConfigParser.ConfigParser() + config = configparser.ConfigParser() try: config.optionxform = str config.read(config_path) @@ -38,19 +38,19 @@ try: config.add_section(user_name) except: - print("Error adding new user section, for user_name " + user_name) + print(("Error adding new user section, for user_name " + user_name)) else: - print("Error, user " + user_name + " already exists") + print(("Error, user " + user_name + " already exists")) save_config(config, config_path) def set_user_items(config, user_name, user_items): - for key in user_items.keys(): + for key in list(user_items.keys()): try: config.set(user_name, key, user_items[key]) except: - print("Error setting config key " + key + " with value " + - str(user_items[key]) + " for user_name " + user_name) + print(("Error setting config key " + key + " with value " + + str(user_items[key]) + " for user_name " + user_name)) return config --- ./mapillary_tools/download.py (original) +++ ./mapillary_tools/download.py (refactored) @@ -1,6 +1,6 @@ -import processing -import uploader -from post_process import save_local_mapping +from . import processing +from . import uploader +from .post_process import save_local_mapping from tqdm import tqdm import os import signal @@ -27,7 +27,7 @@ response = requests.get(download_url, stream=True) if response.status_code != 200: - print(response.json()) + print((response.json())) return False with open(filename, "wb") as f: @@ -107,7 +107,7 @@ not_downloaded += 1 if not_downloaded > 0: - print("Trying to download {} not yet downloaded files".format(not_downloaded)) + print(("Trying to download {} not yet downloaded files".format(not_downloaded))) if do_sleep: print("Waiting 10 seconds before next try") time.sleep(10) @@ -130,7 +130,7 @@ try: user_properties = uploader.authenticate_user(user_name) except: - print("Error, user authentication failed for user " + user_name) + print(("Error, user authentication failed for user " + user_name)) print("Make sure your user credentials are correct, user authentication is required for images to be downloaded from Mapillary.") return None if "user_upload_token" in user_properties: --- ./mapillary_tools/edit_config.py (original) +++ ./mapillary_tools/edit_config.py (refactored) @@ -1,7 +1,7 @@ import mapillary_tools.config as config import os import sys -import uploader +from . import uploader ''' (re)authenticate ''' @@ -20,7 +20,7 @@ try: edit_config_with_jwt(jwt, config_file_path) except Exception as e: - print('Error: %s' % e) + print(('Error: %s' % e)) sys.exit(1) return @@ -44,17 +44,17 @@ section = user_name if not section: - section = raw_input( + section = input( "Enter the Mapillary user name you would like to (re)authenticate : ") # safety check if section exists, otherwise add it if section in config_object.sections(): if not force_overwrite: print("Warning, user name exists with the following items : ") - print(config.load_user(config_object, section)) - sure = raw_input( + print((config.load_user(config_object, section))) + sure = input( "Are you sure you would like to re-authenticate[y,Y,yes,Yes]?(current parameters will be overwritten)") if sure not in ["y", "Y", "yes", "Yes"]: - print("Aborting re-authentication. If you would like to re-authenticate user name {}, rerun this command and confirm re-authentication.".format(section))RefactoringTool: Refactored ./mapillary_tools/exif_aux.py RefactoringTool: Refactored ./mapillary_tools/exif_read.py RefactoringTool: Refactored ./mapillary_tools/exif_write.py RefactoringTool: No changes to ./mapillary_tools/ffmpeg.py RefactoringTool: Refactored ./mapillary_tools/ffprobe.py RefactoringTool: Refactored ./mapillary_tools/geo.py RefactoringTool: No changes to ./mapillary_tools/gpmf.py RefactoringTool: Refactored ./mapillary_tools/gps_parser.py RefactoringTool: Refactored ./mapillary_tools/gpx_from_blackvue.py + print(("Aborting re-authentication. If you would like to re-authenticate user name {}, rerun this command and confirm re-authentication.".format(section))) sys.exit() else: config_object.add_section(section) @@ -62,13 +62,13 @@ if user_email and user_password: user_key = uploader.get_user_key(section) if not user_key: - print("User name {} does not exist, please try again or contact Mapillary user support.".format( - section)) + print(("User name {} does not exist, please try again or contact Mapillary user support.".format( + section))) sys.exit(1) upload_token = uploader.get_upload_token(user_email, user_password) if not upload_token: - print("Authentication failed for user name " + - section + ", please try again.") + print(("Authentication failed for user name " + + section + ", please try again.")) sys.exit(1) user_permission_hash, user_signature_hash = uploader.get_user_hashes( user_key, upload_token) @@ -87,8 +87,8 @@ user_items = uploader.prompt_user_for_user_items(section) if not user_items: - print("Authentication failed for user name " + - section + ", please try again.") + print(("Authentication failed for user name " + + section + ", please try again.")) sys.exit(1) config.update_config(config_file_path, section, user_items) --- ./mapillary_tools/exif_aux.py (original) +++ ./mapillary_tools/exif_aux.py (refactored) @@ -1,6 +1,6 @@ -from exif_read import ExifRead +from .exif_read import ExifRead import os -import processing +from . import processing def exif_gps_fields(): --- ./mapillary_tools/exif_read.py (original) +++ ./mapillary_tools/exif_read.py (refactored) @@ -4,7 +4,7 @@ import sys import exifread import datetime -from geo import normalize_bearing +from .geo import normalize_bearing import uuid sys.path.insert(0, os.path.abspath( os.path.join(os.path.dirname(__file__), ".."))) @@ -335,7 +335,7 @@ fields = ['Image Orientation'] orientation, _ = self._extract_alternative_fields( fields, default=1, field_type=int) - if orientation not in range(1, 9): + if orientation not in list(range(1, 9)): return 1 return orientation @@ -365,8 +365,8 @@ if subrexif in self.tags: vflag = True if not vflag: - print("Missing required EXIF tag: {0} for image {1}".format( - rexif[0], self.filename)) + print(("Missing required EXIF tag: {0} for image {1}".format( + rexif[0], self.filename))) return False return True --- ./mapillary_tools/exif_write.py (original) +++ ./mapillary_tools/exif_write.py (refactored) @@ -2,7 +2,7 @@ import json import piexif -from geo import decimal_to_dms +from .geo import decimal_to_dms from .error import print_error @@ -17,10 +17,10 @@ self._ef = piexif.load(filename) except IOError: etype, value, traceback = sys.exc_info() - print >> sys.stderr, "Error opening file:", value + print("Error opening file:", value, file=sys.stderr) except ValueError: etype, value, traceback = sys.exc_info() - print >> sys.stderr, "Error opening file:", value + print("Error opening file:", value, file=sys.stderr) def add_image_description(self, dict): """Add a dict to image description.""" @@ -91,8 +91,8 @@ try: self._ef[main_key][tag_key] = value except: - print("could not set tag {} under {} with value {}".format( - tag_key, main_key, value)) + print(("could not set tag {} under {} with value {}".format( + tag_key, main_key, value))) def write(self, filename=None): """Save exif data to file.""" @@ -108,4 +108,4 @@ except IOError: type, value, traceback = sys.exc_info() - print >> sys.stderr, "Error saving file:", value + print("Error saving file:", value, file=sys.stderr) --- ./mapillary_tools/ffprobe.py (original) +++ ./mapillary_tools/ffprobe.py (refactored) @@ -79,7 +79,7 @@ def __init__(self,datalines): for a in datalines: if re.match(r'^.+=.+$', a) is None: - print "Warning: detected incorrect stream metadata line format: %s" % a + print("Warning: detected incorrect stream metadata line format: %s" % a) else: (key,val)=a.strip().split('=') key = key.lstrip("TAG:") @@ -126,7 +126,7 @@ try: size=(int(self.__dict__['width']),int(self.__dict__['height'])) except Exception as e: - print "None integer size %s:%s" %(str(self.__dict__['width']),str(+self.__dict__['height'])) + print("None integer size %s:%s" %(str(self.__dict__['width']),str(+self.__dict__['height']))) size=(0,0) return size @@ -151,7 +151,7 @@ try: f=int(self.__dict__['nb_frames']) except Exception as e: - print "None integer frame count" + print("None integer frame count") return f def durationSeconds(self): @@ -165,7 +165,7 @@ try: f=float(self.__dict__['duration']) except Exception as e: - print "None numeric duration" + print("None numeric duration") return f def language(self): @@ -213,8 +213,8 @@ try: b=int(self.__dict__['bit_rate']) except Exception as e: - print "None integer bitrate" + print("None integer bitrate") return b if __name__ == '__main__': - print "Module ffprobe" + print("Module ffprobe") --- ./mapillary_tools/geo.py (original) +++ ./mapillary_tools/geo.py (refactored) @@ -219,8 +219,8 @@ raise ValueError( "time t not in scope of gpx file by {} seconds".format(dt)) else: - print( - "time t not in scope of gpx file by {} seconds, extrapolating...".format(dt)) + print(( + "time t not in scope of gpx file by {} seconds, extrapolating...".format(dt))) if t < points[0][0]: before = points[0] --- ./mapillary_tools/gps_parser.py (original) +++ ./mapillary_tools/gps_parser.py (refactored) @@ -4,13 +4,13 @@ import os import datetime import time -from geo import gpgga_to_dms, utc_to_localtime +from .geo import gpgga_to_dms, utc_to_localtime try: import gpxpy import pynmea2 except ImportError as error: - print error + print(error) ''' Methods for parsing gps data from various file format e.g. GPX, NMEA, SRT. --- ./mapillary_tools/gpx_from_blackvue.py (original) +++ ./mapillary_tools/gpx_from_blackvue.py (refactored) @@ -6,9 +6,9 @@ import sys import re import pynmea2 -from geo import write_gpx -from geo import get_max_distance_from_start -from geo import get_total_distance_traveled +from .geo import write_gpx +from .geo import get_max_distance_from_start +from .geo import get_total_distance_traveled from pymp4.parser import Box from construct.core import RangeError, ConstError @@ -103,8 +103,8 @@ points.append((timestamp, lat, lon, alt)) except Exception as e: - print( - "Error in parsing gps trace to extract time and gps information, nmea parsing failed due to {}".format(e)) + print(( + "Error in parsing gps trace to extract time and gps information, nmea parsing failed due to {}".format(e)))RefactoringTool: Refactored ./mapillary_tools/gpx_from_exif.py RefactoringTool: Refactored ./mapillary_tools/gpx_from_gopro.py RefactoringTool: Refactored ./mapillary_tools/insert_MAPJson.py RefactoringTool: Refactored ./mapillary_tools/interpolation.py RefactoringTool: Refactored ./mapillary_tools/ipc.py RefactoringTool: Refactored ./mapillary_tools/post_process.py #If there are no points after parsing just return empty vector if points == []: @@ -167,8 +167,8 @@ try: bv_data = get_points_from_bv(bv_video,use_nmea_stream_timestamp) except Exception as e: - print( - "Warning, could not extract gps from video {} due to {}, video will be skipped...".format(bv_video, e)) + print(( + "Warning, could not extract gps from video {} due to {}, video will be skipped...".format(bv_video, e))) if bv_data != []: is_stationary_video = is_video_stationary(get_max_distance_from_start(bv_data),get_total_distance_traveled(bv_data)) else: --- ./mapillary_tools/gpx_from_exif.py (original) +++ ./mapillary_tools/gpx_from_exif.py (refactored) @@ -1,5 +1,5 @@ -import exif_read -from geo import write_gpx +from . import exif_read +from .geo import write_gpx def get_points_from_exif(file_list, verbose=False): @@ -10,21 +10,21 @@ exif = exif_read.ExifRead(file) except: if verbose: - print("Warning, EXIF could not be read for image {}.".format(file)) + print(("Warning, EXIF could not be read for image {}.".format(file))) continue try: lon, lat = exif.extract_lon_lat() except: if verbose: - print( - "Warning {} image latitude or longitude tag not in EXIF.".format(file)) + print(( + "Warning {} image latitude or longitude tag not in EXIF.".format(file))) continue try: timestamp = exif.extract_capture_time() except: if verbose: - print( - "Warning {} image capture time tag not in EXIF.".format(file)) + print(( + "Warning {} image capture time tag not in EXIF.".format(file))) continue if lon != None and lat != None and timestamp != None: point = point + (timestamp, lat, lon) --- ./mapillary_tools/gpx_from_gopro.py (original) +++ ./mapillary_tools/gpx_from_gopro.py (refactored) @@ -2,9 +2,9 @@ import datetime import os -from ffmpeg import extract_stream, get_ffprobe -from gpmf import parse_bin, interpolate_times -from geo import write_gpx +from .ffmpeg import extract_stream, get_ffprobe +from .gpmf import parse_bin, interpolate_times +from .geo import write_gpx # author https://github.com/stilldavid --- ./mapillary_tools/insert_MAPJson.py (original) +++ ./mapillary_tools/insert_MAPJson.py (refactored) @@ -2,8 +2,8 @@ import time import uuid import sys -import processing -import uploader +from . import processing +from . import uploader from tqdm import tqdm from .error import print_error @@ -25,8 +25,8 @@ # sanity check if video file is passed if video_import_path and not os.path.isdir(video_import_path) and not os.path.isfile(video_import_path): - print("Error, video path " + video_import_path + - " does not exist, exiting...") + print(("Error, video path " + video_import_path + + " does not exist, exiting...")) sys.exit(1) # in case of video processing, adjust the import path --- ./mapillary_tools/interpolation.py (original) +++ ./mapillary_tools/interpolation.py (refactored) @@ -1,12 +1,12 @@ -import processing -import uploader +from . import processing +from . import uploader import os import sys -from geo import interpolate_lat_lon -from exif_write import ExifEdit -from exif_read import ExifRead -from process_import_meta_properties import add_meta_tag -import process_csv +from .geo import interpolate_lat_lon +from .exif_write import ExifEdit +from .exif_read import ExifRead +from .process_import_meta_properties import add_meta_tag +from . import process_csv import csv import datetime from tqdm import tqdm @@ -30,8 +30,8 @@ timestamps_formated = [datetime_timestamp.strftime( time_format) for datetime_timestamp in timestamps_interpolated] except: - print("Formating timestamps from datetime to time format {} failed...".format( - time_format)) + print(("Formating timestamps from datetime to time format {} failed...".format( + time_format))) sys.exit(1) return timestamps_formated @@ -104,7 +104,7 @@ # get list of files to process process_file_list = uploader.get_total_file_list(import_path) if not len(process_file_list): - print("No images found in the import path " + import_path) + print(("No images found in the import path " + import_path)) sys.exit(1) if data == "missing_gps": @@ -113,11 +113,11 @@ geotags, missing_geotags = processing.get_images_geotags( process_file_list) if not len(missing_geotags): - print("No images in directory {} missing geotags, exiting...".format( - import_path)) + print(("No images in directory {} missing geotags, exiting...".format( + import_path))) sys.exit(1) if not len(geotags): - print("No images in directory {} with geotags.".format(import_path)) + print(("No images in directory {} with geotags.".format(import_path))) sys.exit(1) sys.stdout.write("Interpolating gps for {} images missing geotags.".format( @@ -143,14 +143,14 @@ exif_edit.add_direction(bearing) else: if verbose: - print( - "Warning, bearing not interpolated for image {}.".format(image)) + print(( + "Warning, bearing not interpolated for image {}.".format(image))) if elevation: exif_edit.add_altitude(elevation) else: if verbose: - print( - "Warning, altitude not interpolated for image {}.".format(image)) + print(( + "Warning, altitude not interpolated for image {}.".format(image))) meta = {} @@ -176,7 +176,7 @@ if timestamp: timestamps.append(timestamp) else: - print("Capture could not be extracted for image {}.".format(image)) + print(("Capture could not be extracted for image {}.".format(image))) # interpolate timestamps_interpolated = processing.interpolate_timestamp( @@ -187,7 +187,7 @@ counter = 0 # write back - for image, timestamp in tqdm(zip(process_file_list, timestamps_interpolated), desc="Writing capture time in image EXIF"): + for image, timestamp in tqdm(list(zip(process_file_list, timestamps_interpolated)), desc="Writing capture time in image EXIF"): # print progress counter += 1 --- ./mapillary_tools/ipc.py (original) +++ ./mapillary_tools/ipc.py (refactored) @@ -40,8 +40,8 @@ try: __write(obj) except Exception as e: - print('IPC error for: %s' % obj) - print('Error: %s' % e) + print(('IPC error for: %s' % obj)) + print(('Error: %s' % e)) def send_error(message): send('error', {'message': message}) --- ./mapillary_tools/post_process.py (original) +++ ./mapillary_tools/post_process.py (refactored) @@ -1,12 +1,12 @@ import os import sys -import processing -import uploader +from . import processing +from . import uploader import json import shutil from tqdm import tqdm import csv -import exif_read +from . import exif_read from . import ipc @@ -33,7 +33,7 @@ destination_mapping[image] = { "sequence": str(sequence_counter)} else: - print("MAPSequenceUUID could not be read for image {}".format(image))RefactoringTool: Refactored ./mapillary_tools/process_csv.py RefactoringTool: Refactored ./mapillary_tools/process_geotag_properties.py + print(("MAPSequenceUUID could not be read for image {}".format(image))) return destination_mapping @@ -65,7 +65,7 @@ if "MAPPhotoUUID" in image_description: image_file_uuid = str(image_description["MAPPhotoUUID"]) else: - print("Warning, image {} EXIF does not contain mapillary image description and mapillary_image_description.json log file does not exist. Try to process the image using mapillary_tools.".format(file)) + print(("Warning, image {} EXIF does not contain mapillary image description and mapillary_image_description.json log file does not exist. Try to process the image using mapillary_tools.".format(file))) if image_file_uuid: local_mapping.append((relative_path, image_file_uuid)) return local_mapping @@ -93,8 +93,8 @@ # sanity check if video file is passed if video_import_path and not os.path.isdir(video_import_path) and not os.path.isfile(video_import_path): - print("Error, video path " + video_import_path + - " does not exist, exiting...") + print(("Error, video path " + video_import_path + + " does not exist, exiting...")) sys.exit(1) if move_all_images: move_sequences = True @@ -111,8 +111,8 @@ # basic check for all if not import_path or not os.path.isdir(import_path): - print("Error, import directory " + import_path + - " does not exist, exiting...") + print(("Error, import directory " + import_path + + " does not exist, exiting...")) sys.exit(1) if save_local_mapping: local_mapping = save_local_mapping(import_path) @@ -185,8 +185,8 @@ } summary_dict["process summary"]["duplicates"] = duplicates_file_list_count summary_dict["process summary"]["processed_not_yet_uploaded"] = to_be_uploaded_files_count - print("Import summary for import path {} :".format(import_path)) - print(json.dumps(summary_dict, indent=4)) + print(("Import summary for import path {} :".format(import_path))) + print((json.dumps(summary_dict, indent=4))) ipc.send('summary', summary_dict) @@ -195,8 +195,8 @@ processing.save_json(summary_dict, os.path.join( import_path, "mapillary_import_summary.json")) except Exception as e: - print("Could not save summary into json at {}, due to {}".format( - os.path.join(import_path, "mapillary_import_summary.json"), e)) + print(("Could not save summary into json at {}, due to {}".format( + os.path.join(import_path, "mapillary_import_summary.json"), e))) if list_file_status: status_list_dict = {} status_list_dict["successfully uploaded"] = uploaded_files @@ -205,20 +205,20 @@ status_list_dict["duplicates"] = duplicates_file_list status_list_dict["processed_not_yet_uploaded"] = to_be_uploaded_files print("") - print("List of file status for import path {} :".format(import_path)) - print(json.dumps(status_list_dict, indent=4)) + print(("List of file status for import path {} :".format(import_path))) + print((json.dumps(status_list_dict, indent=4))) if save_as_json: try: processing.save_json(status_list_dict, os.path.join( import_path, "mapillary_import_image_status_list.json")) except Exception as e: - print("Could not save image status list into json at {}, due to {}".format( - os.path.join(import_path, "mapillary_import_image_status_list.json"), e)) + print(("Could not save image status list into json at {}, due to {}".format( + os.path.join(import_path, "mapillary_import_image_status_list.json"), e))) split_import_path = split_import_path if split_import_path else import_path if any([move_sequences, move_duplicates, move_uploaded]): if not os.path.isdir(split_import_path): - print("Split import path {} does not exist.".format( - split_import_path)) + print(("Split import path {} does not exist.".format( + split_import_path))) sys.exit(1) destination_mapping = {} --- ./mapillary_tools/process_csv.py (original) +++ ./mapillary_tools/process_csv.py (refactored) @@ -1,10 +1,10 @@ -import processing -import uploader +from . import processing +from . import uploader import os import sys import datetime -import process_import_meta_properties -from exif_write import ExifEdit +from . import process_import_meta_properties +from .exif_write import ExifEdit import csv from tqdm import tqdm @@ -59,8 +59,8 @@ # check if types are valid for meta_type in meta_types: if meta_type not in META_DATA_TYPES: - print("Error, invalid meta data type, valid types are " + - str(META_DATA_TYPES)) + print(("Error, invalid meta data type, valid types are " + + str(META_DATA_TYPES))) sys.exit(1) return meta_columns, meta_names, meta_types @@ -168,7 +168,7 @@ process_import_meta_properties.add_meta_tag( meta, tag_type, tag_key, tag_value) except: - print("Error, meta data {} could not be extracted.".format(tag_key)) + print(("Error, meta data {} could not be extracted.".format(tag_key))) return meta @@ -180,7 +180,7 @@ if header: next(csvreader, None) - csv_data = zip(*csvreader) + csv_data = list(zip(*csvreader)) return csv_data @@ -206,8 +206,8 @@ # sanity checks if not import_path or not os.path.isdir(import_path): - print("Error, import directory " + import_path + - " doesnt not exist, exiting...") + print(("Error, import directory " + import_path + + " doesnt not exist, exiting...")) sys.exit(1) if not csv_path or not os.path.isfile(csv_path): @@ -217,7 +217,7 @@ # get list of file to process process_file_list = uploader.get_total_file_list(import_path) if not len(process_file_list): - print("No images found in the import path " + import_path) + print(("No images found in the import path " + import_path)) sys.exit(1) if gps_week_column != None and convert_gps_time == False: @@ -235,7 +235,7 @@ print("Error, csv column numbers start with 1, one of the columns specified is 0.") sys.exit(1) - column_indexes = map(lambda x: x - 1 if x else None, column_indexes) + column_indexes = [x - 1 if x else None for x in column_indexes] # checks for meta arguments if any meta_columns, meta_names, meta_types = validate_meta_data( @@ -261,7 +261,7 @@ # get image entry index image_index = get_image_index(image, file_names) if file_names else idx if image_index == None: - print("Warning, no entry found in csv file for image " + image) + print(("Warning, no entry found in csv file for image " + image)) continue # get required data @@ -299,5 +299,5 @@ try: exif_edit.write(filename=filename) except: - print("Error, image EXIF could not be written back for image " + image) + print(("Error, image EXIF could not be written back for image " + image)) return None --- ./mapillary_tools/process_geotag_properties.py (original) +++ ./mapillary_tools/process_geotag_properties.py (refactored) @@ -1,4 +1,4 @@ -import processing +from . import processing import os import sys from .error import print_error @@ -19,8 +19,8 @@ # sanity check if video file is passed if video_import_path and not os.path.isdir(video_import_path) and not os.path.isfile(video_import_path): - print("Error, video path " + video_import_path + - " does not exist, exiting...")RefactoringTool: Refactored ./mapillary_tools/process_import_meta_properties.py RefactoringTool: Refactored ./mapillary_tools/process_sequence_properties.py RefactoringTool: Refactored ./mapillary_tools/process_upload_params.py RefactoringTool: Refactored ./mapillary_tools/process_user_properties.py RefactoringTool: Refactored ./mapillary_tools/process_video.py + print(("Error, video path " + video_import_path + + " does not exist, exiting...")) sys.exit(1) # in case of video processing, adjust the import path --- ./mapillary_tools/process_import_meta_properties.py (original) +++ ./mapillary_tools/process_import_meta_properties.py (refactored) @@ -1,15 +1,15 @@ import time import os import sys -import processing -import uploader -from exif_read import ExifRead +from . import processing +from . import uploader +from .exif_read import ExifRead from tqdm import tqdm from .error import print_error META_DATA_TYPES = {"strings": str, "doubles": float, - "longs": long, + "longs": int, "dates": int, "booleans": bool} @@ -132,8 +132,8 @@ exif = ExifRead(image) except: if verbose: - print("Warning, EXIF could not be read for image " + - image + ", import properties not read.") + print(("Warning, EXIF could not be read for image " + + image + ", import properties not read.")) return None try: import_meta_data_properties["MAPOrientation"] = exif.extract_orientation( @@ -181,8 +181,8 @@ # sanity check if video file is passed if video_import_path and not os.path.isdir(video_import_path) and not os.path.isfile(video_import_path): - print("Error, video path " + video_import_path + - " does not exist, exiting...") + print(("Error, video path " + video_import_path + + " does not exist, exiting...")) sys.exit(1) # in case of video processing, adjust the import path --- ./mapillary_tools/process_sequence_properties.py (original) +++ ./mapillary_tools/process_sequence_properties.py (refactored) @@ -3,10 +3,10 @@ import datetime import time import sys -from exif_read import ExifRead -from geo import compute_bearing, gps_distance, diff_bearing, gps_speed -import processing -import uploader +from .exif_read import ExifRead +from .geo import compute_bearing, gps_distance, diff_bearing, gps_speed +from . import processing +from . import uploader from tqdm import tqdm from .error import print_error @@ -20,8 +20,8 @@ final_capture_times, import_path, verbose=False): - for image, direction, capture_time in tqdm(zip(final_file_list, - final_directions, final_capture_times), desc="Finalizing sequence process"): + for image, direction, capture_time in tqdm(list(zip(final_file_list, + final_directions, final_capture_times)), desc="Finalizing sequence process"): mapillary_description = { 'MAPSequenceUUID': sequence, 'MAPCompassHeading': { @@ -53,8 +53,8 @@ # sanity check if video file is passed if video_import_path and not os.path.isdir(video_import_path) and not os.path.isfile(video_import_path): - print("Error, video path " + video_import_path + - " does not exist, exiting...") + print(("Error, video path " + video_import_path + + " does not exist, exiting...")) sys.exit(1) # in case of video processing, adjust the import path @@ -82,7 +82,7 @@ import_path) if not len(process_file_list): if verbose: - print("No images to run sequence process in root " + import_path) + print(("No images to run sequence process in root " + import_path)) print( "If the images have already been processed and not yet uploaded, they can be processed again, by passing the argument --rerun") else: @@ -110,7 +110,7 @@ root) if not len(process_file_list): if verbose: - print("No images to run sequence process in root " + root) + print(("No images to run sequence process in root " + root)) print( "If the images have already been processed and not yet uploaded, they can be processed again, by passing the argument --rerun") continue @@ -125,8 +125,8 @@ # --------------------------------------- if not keep_duplicates: if verbose: - print("Flagging images as duplicates if consecutive distance difference less than {} and angle difference less than {}".format( - duplicate_distance, duplicate_angle)) + print(("Flagging images as duplicates if consecutive distance difference less than {} and angle difference less than {}".format( + duplicate_distance, duplicate_angle))) # process for each sequence for sequence in sequences: @@ -157,8 +157,8 @@ computed_speed = gps_speed( computed_distances, computed_delta_ts) # in meters/second if len([x for x in computed_speed if x > MAX_CAPTURE_SPEED]) > 0: - print("Warning: The distance in sequence including images\n{}\nto\n{}\nis too large for the time difference (very high apparent capture speed). Are you sure timestamps and locations are correct?".format( - file_list[0], file_list[-1])) + print(("Warning: The distance in sequence including images\n{}\nto\n{}\nis too large for the time difference (very high apparent capture speed). Are you sure timestamps and locations are correct?".format( + file_list[0], file_list[-1]))) # INTERPOLATE TIMESTAMPS, in case of identical timestamps capture_times = processing.interpolate_timestamp(capture_times) --- ./mapillary_tools/process_upload_params.py (original) +++ ./mapillary_tools/process_upload_params.py (refactored) @@ -1,7 +1,7 @@ import os import sys -import processing -import uploader +from . import processing +from . import uploader from tqdm import tqdm from .error import print_error @@ -16,8 +16,8 @@ # sanity check if video file is passed if video_import_path and not os.path.isdir(video_import_path) and not os.path.isfile(video_import_path): - print("Error, video path " + video_import_path + - " does not exist, exiting...") + print(("Error, video path " + video_import_path + + " does not exist, exiting...")) sys.exit(1) # in case of video processing, adjust the import path --- ./mapillary_tools/process_user_properties.py (original) +++ ./mapillary_tools/process_user_properties.py (refactored) @@ -1,4 +1,4 @@ -import processing +from . import processing import os import sys from .error import print_error @@ -17,8 +17,8 @@ # sanity check if video file is passed if video_import_path and not os.path.isdir(video_import_path) and not os.path.isfile(video_import_path): - print("Error, video path " + video_import_path + - " does not exist, exiting...") + print(("Error, video path " + video_import_path + + " does not exist, exiting...")) sys.exit(1) # in case of video processing, adjust the import path --- ./mapillary_tools/process_video.py (original) +++ ./mapillary_tools/process_video.py (refactored) @@ -1,17 +1,17 @@ -from ffprobe import FFProbe +from .ffprobe import FFProbe import datetime import os -import processing +from . import processing import subprocess import sys -import uploader +from . import uploader from tqdm import tqdm import logging import io import struct from pymp4.parser import Box -from exif_write import ExifEdit +from .exif_write import ExifEdit ZERO_PADDING = 6 TIME_FORMAT = "%Y-%m-%d %H:%M:%S" @@ -54,14 +54,14 @@ skip_subfolders=False): if import_path and not os.path.isdir(import_path): - print("Error, import directory " + import_path + - " does not exist, exiting...") # ERROR LOGRefactoringTool: Refactored ./mapillary_tools/processing.py + print(("Error, import directory " + import_path + + " does not exist, exiting...")) # ERROR LOG sys.exit(1) # sanity check if not os.path.isdir(video_import_path) and not os.path.isfile(video_import_path): - print("Error, video path " + video_import_path + - " does not exist, exiting...") + print(("Error, video path " + video_import_path + + " does not exist, exiting...")) sys.exit(1) # Adjust the import path @@ -81,12 +81,12 @@ if not os.path.isdir(per_video_import_path): os.makedirs(per_video_import_path) - print("Video sampling path set to {}".format(per_video_import_path)) + print(("Video sampling path set to {}".format(per_video_import_path))) # check video logs video_upload = processing.video_upload( video_import_path, per_video_import_path, verbose) if video_upload: - print("Video {} has already been uploaded, contact support@mapillary for help with reuploading it if neccessary.".format(video)) + print(("Video {} has already been uploaded, contact support@mapillary for help with reuploading it if neccessary.".format(video))) extract_frames(video, per_video_import_path, @@ -107,7 +107,7 @@ if verbose: # INFO LOG - print('extracting frames from {}'.format(video_file)) + print(('extracting frames from {}'.format(video_file))) video_filename = ".".join(os.path.basename(video_file).split(".")[:-1]) @@ -129,8 +129,8 @@ sys.exit(1) except Exception as e: # ERROR LOG - print("Error, could not extract frames from video {} due to {}".format( - video_file, e)) + print(("Error, could not extract frames from video {} due to {}".format( + video_file, e))) sys.exit(1) if video_start_time: @@ -174,23 +174,23 @@ sample_interval, duration_ratio) - for image, timestamp in tqdm(zip(frame_list, - video_frame_timestamps), desc="Inserting frame capture time"): + for image, timestamp in tqdm(list(zip(frame_list, + video_frame_timestamps)), desc="Inserting frame capture time"): try: exif_edit = ExifEdit(image) exif_edit.add_date_time_original(timestamp) exif_edit.write() except: # ERROR LOG - print("Could not insert timestamp into video frame " + - os.path.basename(image)[:-4]) + print(("Could not insert timestamp into video frame " + + os.path.basename(image)[:-4])) continue def get_video_end_time(video_file): """Get video end time in seconds""" if not os.path.isfile(video_file): - print("Error, video file {} does not exist".format(video_file)) + print(("Error, video file {} does not exist".format(video_file))) return None try: time_string = FFProbe(video_file).video[0].creation_time @@ -208,7 +208,7 @@ def get_video_start_time(video_file): """Get start time in seconds""" if not os.path.isfile(video_file): - print("Error, video file {} does not exist".format(video_file)) + print(("Error, video file {} does not exist".format(video_file))) return None video_end_time = get_video_end_time(video_file) duration = get_video_duration(video_file) --- ./mapillary_tools/processing.py (original) +++ ./mapillary_tools/processing.py (refactored) @@ -8,17 +8,17 @@ import hashlib import base64 from collections import OrderedDict -from exif_read import ExifRead -from exif_write import ExifEdit -from exif_aux import verify_exif -from geo import normalize_bearing, interpolate_lat_lon, gps_distance, gps_speed -import config -import uploader +from .exif_read import ExifRead +from .exif_write import ExifEdit +from .exif_aux import verify_exif +from .geo import normalize_bearing, interpolate_lat_lon, gps_distance, gps_speed +from . import config +from . import uploader from dateutil.tz import tzlocal -from gps_parser import get_lat_lon_time_from_gpx, get_lat_lon_time_from_nmea -from gpx_from_gopro import gpx_from_gopro -from gpx_from_blackvue import gpx_from_blackvue -from gpx_from_exif import gpx_from_exif +from .gps_parser import get_lat_lon_time_from_gpx, get_lat_lon_time_from_nmea +from .gpx_from_gopro import gpx_from_gopro +from .gpx_from_blackvue import gpx_from_blackvue +from .gpx_from_exif import gpx_from_exif from tqdm import tqdm from . import ipc from .error import print_error @@ -274,8 +274,8 @@ # print time now to warn in case local_time if local_time: now = datetime.datetime.now(tzlocal()) - print("Your local timezone is {0}. If not, the geotags will be wrong." - .format(now.strftime('%Y-%m-%d %H:%M:%S %Z'))) + print(("Your local timezone is {0}. If not, the geotags will be wrong." + .format(now.strftime('%Y-%m-%d %H:%M:%S %Z')))) else: # if not local time to be used, warn UTC will be used print("It is assumed that the image timestamps are in UTC. If not, try using the option --local_time.") @@ -311,8 +311,8 @@ # update offset time with the gps start time offset_time += (sorted(sub_second_times) [0] - gps_trace[0][0]).total_seconds() - for image, capture_time in tqdm(zip(process_file_list, - sub_second_times), desc="Inserting gps data into image EXIF"): + for image, capture_time in tqdm(list(zip(process_file_list, + sub_second_times)), desc="Inserting gps data into image EXIF"): if not capture_time: print_error( "Error, capture time could not be extracted for image " + image) @@ -338,8 +338,8 @@ lat, lon, bearing, elevation = interpolate_lat_lon(gps_trace, capture_time) except Exception as e: - print("Warning, {}, interpolation of latitude and longitude failed for image {}".format( - e, image)) + print(("Warning, {}, interpolation of latitude and longitude failed for image {}".format( + e, image))) return None corrected_bearing = (bearing + offset_angle) % 360 @@ -348,7 +348,7 @@ geotag_properties = {"MAPLatitude": lat} geotag_properties["MAPLongitude"] = lon else: - print("Warning, invalid latitude and longitude for image {}".format(image)) + print(("Warning, invalid latitude and longitude for image {}".format(image))) return None geotag_properties["MAPCaptureTime"] = datetime.datetime.strftime(capture_time, @@ -370,16 +370,16 @@ def get_upload_param_properties(log_root, image, user_name, user_upload_token, user_permission_hash, user_signature_hash, user_key, verbose=False): if not os.path.isdir(log_root): - print("Warning, sequence process has not been done for image " + image + - ", therefore it will not be included in the upload params processing.") + print(("Warning, sequence process has not been done for image " + image + + ", therefore it will not be included in the upload params processing.")) return None # check if geotag process was a success log_sequence_process_success = os.path.join( log_root, "sequence_process_success") if not os.path.isfile(log_sequence_process_success): - print("Warning, sequence process failed for image " + image + - ", therefore it will not be included in the upload params processing.") + print(("Warning, sequence process failed for image " + image + + ", therefore it will not be included in the upload params processing.")) return None upload_params_process_success_path = os.path.join(log_root, @@ -393,13 +393,13 @@ sequence_data = load_json( sequence_process_json_path) except: - print("Warning, sequence data not read for image " + image + - ", therefore it will not be included in the upload params processing.") + print(("Warning, sequence data not read for image " + image + + ", therefore it will not be included in the upload params processing.")) return None if "MAPSequenceUUID" not in sequence_data: - print("Warning, sequence uuid not in sequence data for image " + image + - ", therefore it will not be included in the upload params processing.") + print(("Warning, sequence uuid not in sequence data for image " + image + + ", therefore it will not be included in the upload params processing.")) return None sequence_uuid = sequence_data["MAPSequenceUUID"] @@ -425,8 +425,8 @@ save_json({"MAPSettingsUploadHash": settings_upload_hash}, os.path.join(log_root, "settings_upload_hash.json")) except: - print("Warning, settings upload hash not set for image " + image + - ", therefore it will not be uploaded.") + print(("Warning, settings upload hash not set for image " + image + + ", therefore it will not be uploaded.")) return None return upload_params @@ -441,8 +441,8 @@ log_root, sub_command + "_failed") if os.path.isfile(sub_command_status) and sub_command != "import_meta_data_process": - print("Warning, required {} failed for image ".format(sub_command) + - image) + print(("Warning, required {} failed for image ".format(sub_command) + + image)) return None sub_command_data_path = os.path.join( @@ -451,8 +451,8 @@ if (sub_command == "settings_upload_hash" or sub_command == "upload_params_process") and master_upload: continue else: - print("Warning, required {} did not result in a valid json file for image ".format( - sub_command) + image) + print(("Warning, required {} did not result in a valid json file for image ".format( + sub_command) + image)) return None if sub_command == "settings_upload_hash" or sub_command == "upload_params_process": continue @@ -460,21 +460,21 @@ sub_command_data = load_json(sub_command_data_path) if not sub_command_data: if verbose: - print( - "Warning, no data read from json file " + json_file) + print(( + "Warning, no data read from json file " + json_file)) return None final_mapillary_image_description.update(sub_command_data) except: if sub_command == "import_meta_data_process": if verbose: - print("Warning, could not load json file " + - sub_command_data_path) + print(("Warning, could not load json file " + + sub_command_data_path)) continue else: if verbose: - print("Warning, could not load json file " + - sub_command_data_path) + print(("Warning, could not load json file " + + sub_command_data_path)) return None # a unique photo ID to check for duplicates in the backend in case the @@ -569,14 +569,14 @@ def get_geotag_data(log_root, image, verbose=False): if not os.path.isdir(log_root): if verbose: - print("Warning, no logs for image " + image) + print(("Warning, no logs for image " + image)) return None # check if geotag process was a success log_geotag_process_success = os.path.join(log_root, "geotag_process_success") if not os.path.isfile(log_geotag_process_success): - print("Warning, geotag process failed for image " + image + - ", therefore it will not be included in the sequence processing.") + print(("Warning, geotag process failed for image " + image + + ", therefore it will not be included in the sequence processing.")) return None # load the geotag json geotag_process_json_path = os.path.join(log_root, @@ -586,8 +586,8 @@ return geotag_data except: if verbose: - print("Warning, geotag data not read for image " + image + - ", therefore it will not be included in the sequence processing.") + print(("Warning, geotag data not read for image " + image + + ", therefore it will not be included in the sequence processing.")) return None @@ -734,7 +734,7 @@ if import_path not in import_paths: import_paths.append(import_path) else: - print("Warning, {} has already been sampled into {}, please make sure all the previously sampled frames are deleted, otherwise the alignment might be incorrect".format(video_file, import_path)) + print(("Warning, {} has already been sampled into {}, please make sure all the previously sampled frames are deleted, otherwise the alignment might be incorrect".format(video_file, import_path))) for video_import_path in import_paths: if os.path.isdir(video_import_path): if len(uploader.get_success_upload_file_list(video_import_path)): @@ -828,8 +828,8 @@ # if there is meta data from before, remove it if os.path.isfile(log_MAPJson): if verbose: - print("Warning, {} in this run has failed, previously generated properties will be removed.".format( - process)) + print(("Warning, {} in this run has failed, previously generated properties will be removed.".format( + process))) os.remove(log_MAPJson) decoded_image = force_decode(image) @@ -956,9 +956,9 @@ total_file_list = uploader.get_total_file_list( import_path, skip_subfolders) - print("Running {} for {} images, skipping {} images.".format(process, + print(("Running {} for {} images, skipping {} images.".format(process, len_process_file_list, - len(total_file_list) - len_process_file_list)) + len(total_file_list) - len_process_file_list))) def load_geotag_points(process_file_list, verbose=False): @@ -1002,16 +1002,16 @@ sequences = [] # sort based on time - sort_by_time = zip(capture_times, + sort_by_time = list(zip(capture_times, file_list, lats, lons, - directions) + directions)) sort_by_time.sort() capture_times, file_list, lats, lons, directions = [ list(x) for x in zip(*sort_by_time)] - latlons = zip(lats, - lons) + latlons = list(zip(lats, + lons)) # initialize first sequence sequence_index = 0 @@ -1053,11 +1053,11 @@ filepath], "directions": [directions[1:][i]], "latlons": [latlons[1:][i]], "capture_times": [capture_times[1:][i]]}) if verbose: if cut_distance: - print('Cut {}: Delta in distance {} meters is bigger than cutoff_distance {} meters at {}'.format( - cut, distances[i], cutoff_distance, file_list[i + 1])) + print(('Cut {}: Delta in distance {} meters is bigger than cutoff_distance {} meters at {}'.format( + cut, distances[i], cutoff_distance, file_list[i + 1]))) elif cut_time: - print('Cut {}: Delta in time {} seconds is bigger then cutoff_time {} seconds at {}'.format(RefactoringTool: Refactored ./mapillary_tools/upload.py RefactoringTool: Refactored ./mapillary_tools/uploader.py - cut, capture_deltas[i].total_seconds(), cutoff_time, file_list[i + 1])) + print(('Cut {}: Delta in time {} seconds is bigger then cutoff_time {} seconds at {}'.format( + cut, capture_deltas[i].total_seconds(), cutoff_time, file_list[i + 1]))) else: # delta not too big, continue with current # group @@ -1102,11 +1102,11 @@ if len(time_dict) >= 2: # set time interval as the last available time interval - time_dict[time_dict.keys()[-1] - ]["interval"] = time_dict[time_dict.keys()[-2]]["interval"] + time_dict[list(time_dict.keys())[-1] + ]["interval"] = time_dict[list(time_dict.keys())[-2]]["interval"] else: # set time interval assuming capture interval is 1 second - time_dict[time_dict.keys()[0]]["interval"] = time_dict[time_dict.keys()[ + time_dict[list(time_dict.keys())[0]]["interval"] = time_dict[list(time_dict.keys())[ 0]]["count"] * 1. # interpolate timestamps --- ./mapillary_tools/upload.py (original) +++ ./mapillary_tools/upload.py (refactored) @@ -2,9 +2,9 @@ import sys import os -import uploader +from . import uploader import json -from exif_aux import verify_mapillary_tag +from .exif_aux import verify_mapillary_tag from . import ipc def upload(import_path, verbose=False, skip_subfolders=False, number_threads=None, max_attempts=None, video_import_path=None, dry_run=False,api_version=1.0): @@ -20,8 +20,8 @@ ''' # sanity check if video file is passed if video_import_path and (not os.path.isdir(video_import_path) and not os.path.isfile(video_import_path)): - print("Error, video path " + video_import_path + - " does not exist, exiting...") + print(("Error, video path " + video_import_path + + " does not exist, exiting...")) sys.exit(1) # in case of video processing, adjust the import path @@ -35,8 +35,8 @@ # basic check for all if not import_path or not os.path.isdir(import_path): - print("Error, import directory " + import_path + - " does not exist, exiting...") + print(("Error, import directory " + import_path + + " does not exist, exiting...")) sys.exit(1) # get list of file to process @@ -55,7 +55,7 @@ print("All images have already been uploaded") else: if len(failed_file_list): - upload_failed = raw_input( + upload_failed = input( "Retry uploading previously failed image uploads? [y/n]: ") if not ipc.is_enabled() else 'y' # if yes, add images to the upload list if upload_failed in ["y", "Y", "yes", "Yes"]: @@ -96,8 +96,8 @@ # inform how many images are to be uploaded and how many are being skipped # from upload - print("Uploading {} images with valid mapillary tags (Skipping {})".format( - len(upload_file_list), len(total_file_list) - len(upload_file_list))) + print(("Uploading {} images with valid mapillary tags (Skipping {})".format( + len(upload_file_list), len(total_file_list) - len(upload_file_list)))) if api_version==2.0: uploder.uploadfile_list if len(direct_upload_file_list): --- ./mapillary_tools/uploader.py (original) +++ ./mapillary_tools/uploader.py (refactored) @@ -1,32 +1,32 @@ -from exif_read import ExifRead +from .exif_read import ExifRead import json import os -import urllib2 -import urllib -import httplib +import urllib.request, urllib.error, urllib.parse +import urllib.request, urllib.parse, urllib.error +import http.client import datetime import socket import mimetypes import random import string -from Queue import Queue +from queue import Queue import threading import time -import config +from . import config import getpass import sys -import processing +from . import processing import requests import yaml from tqdm import tqdm from . import ipc from .error import print_error from .utils import force_decode -from gpx_from_blackvue import gpx_from_blackvue, get_points_from_bv -from process_video import get_video_duration -from process_video import get_video_start_time_blackvue -from geo import get_timezone_and_utc_offset -from camera_support.prepare_blackvue_videos import get_blackvue_info +from .gpx_from_blackvue import gpx_from_blackvue, get_points_from_bv +from .process_video import get_video_duration +from .process_video import get_video_start_time_blackvue +from .geo import get_timezone_and_utc_offset +from .camera_support.prepare_blackvue_videos import get_blackvue_info if os.getenv("AWS_S3_ENDPOINT", None) is None: MAPILLARY_UPLOAD_URL = "https://secure-upload.mapillary.com" else: @@ -98,7 +98,7 @@ boundary = ''.join(random.choice(BOUNDARY_CHARS) for i in range(30)) lines = [] - for name, value in fields.items(): + for name, value in list(fields.items()): lines.extend(( '--{0}'.format(boundary), 'Content-Disposition: form-data; name="{0}"'.format( @@ -107,7 +107,7 @@ str(value), )) - for name, value in files.items(): + for name, value in list(files.items()): filename = value['filename'] if 'mimetype' in value: mimetype = value['mimetype'] @@ -138,7 +138,7 @@ def prompt_to_finalize(subcommand): for i in range(3): - finalize = raw_input( + finalize = input( "Finalize all {} in this import? [y/n]: ".format(subcommand)) if finalize in ["y", "Y", "yes", "Yes"]: return 1 @@ -161,11 +161,11 @@ ''' request_url = "https://a.mapillary.com/v3/users/{}/upload_secrets?client_id={}".format( credentials["MAPSettingsUserKey"], CLIENT_ID) - request = urllib2.Request(request_url) + request = urllib.request.Request(request_url) request.add_header('Authorization', 'Bearer {}'.format( credentials["user_upload_token"])) try: - response = json.loads(urllib2.urlopen(request).read()) + response = json.loads(urllib.request.urlopen(request).read()) except requests.exceptions.HTTPError as e: print("Error getting upload parameters, upload could not start") sys.exit(1) @@ -332,8 +332,8 @@ def print_summary(file_list): # inform upload has finished and print out the summary - print("Done uploading {} images.".format( - len(file_list))) # improve upload summary + print(("Done uploading {} images.".format( + len(file_list)))) # improve upload summary def get_upload_token(mail, pwd): @@ -341,8 +341,8 @@ Get upload token ''' try: - params = urllib.urlencode({"email": mail, "password": pwd}) - response = urllib.urlopen(LOGIN_URL, params) + params = urllib.parse.urlencode({"email": mail, "password": pwd}) + response = urllib.request.urlopen(LOGIN_URL, params) except: return None resp = json.loads(response.read()) @@ -355,9 +355,9 @@ organization_key = None call = ORGANIZATIONS_URL.format(user_key, CLIENT_ID) - req = urllib2.Request(call) + req = urllib.request.Request(call) req.add_header('Authorization', 'Bearer {}'.format(upload_token)) - resp = json.loads(urllib2.urlopen(req).read()) + resp = json.loads(urllib.request.urlopen(req).read()) organization_usernames = [] for org in resp: @@ -366,8 +366,8 @@ organization_key = org['key'] if not organization_key: - print("No valid organization key found for organization user name " + - organization_username) + print(("No valid organization key found for organization user name " + + organization_username)) print("Available organization user names for current user are : ") print(organization_usernames) sys.exit(1) @@ -377,9 +377,9 @@ def validate_organization_key(user_key, organization_key, upload_token): call = ORGANIZATIONS_URL.format(user_key, CLIENT_ID) - req = urllib2.Request(call) + req = urllib.request.Request(call) req.add_header('Authorization', 'Bearer {}'.format(upload_token)) - resp = json.loads(urllib2.urlopen(req).read()) + resp = json.loads(urllib.request.urlopen(req).read()) for org in resp: if org['key'] == organization_key: return @@ -390,9 +390,9 @@ def validate_organization_privacy(user_key, organization_key, private, upload_token): call = ORGANIZATIONS_URL.format(user_key, CLIENT_ID) - req = urllib2.Request(call) + req = urllib.request.Request(call) req.add_header('Authorization', 'Bearer {}'.format(upload_token)) - resp = json.loads(urllib2.urlopen(req).read()) + resp = json.loads(urllib.request.urlopen(req).read()) for org in resp: if org['key'] == organization_key: @@ -402,8 +402,8 @@ privacy = "private" if 'private_repository' in org and org[ 'private_repository'] else "public" privacy_provided = "private" if private else "public" - print("Organization " + - org['name'] + " with key " + org['key'] + " is " + privacy + " while your import privacy settings state " + privacy_provided) + print(("Organization " + + org['name'] + " with key " + org['key'] + " is " + privacy + " while your import privacy settings state " + privacy_provided)) sys.exit(1) @@ -422,8 +422,8 @@ def prompt_user_for_user_items(user_name): user_items = {} - print("Enter user credentials for user " + user_name + " :") - user_email = raw_input("Enter email : ") + print(("Enter user credentials for user " + user_name + " :")) + user_email = input("Enter email : ") user_password = getpass.getpass("Enter user password : ") user_key = get_user_key(user_name) if not user_key: @@ -457,7 +457,7 @@ try: config.create_config(GLOBAL_CONFIG_FILEPATH) except Exception as e: - print("Failed to create authentication config file due to {}".format(e)) + print(("Failed to create authentication config file due to {}".format(e))) sys.exit(1) config.update_config( GLOBAL_CONFIG_FILEPATH, user_name, user_items) @@ -472,13 +472,13 @@ raise ValueError('Could not authenticate user. Missing username or password') upload_token = uploader.get_upload_token(user_email, user_password) if not upload_token: - print("Authentication failed for user name " + - user_name + ", please try again.") + print(("Authentication failed for user name " + + user_name + ", please try again.")) sys.exit(1) user_key = get_user_key(user_name) if not user_key: - print("User name {} does not exist, please try again or contact Mapillary user support.".format( - user_name)) + print(("User name {} does not exist, please try again or contact Mapillary user support.".format( + user_name))) sys.exit(1) user_permission_hash, user_signature_hash = get_user_hashes( user_key, upload_token) @@ -500,17 +500,17 @@ if "MAPILLARY_SECRET_HASH" in admin_items: master_key = admin_items["MAPILLARY_SECRET_HASH"] else: - create_config = raw_input( + create_config = input( "Master upload key does not exist in your global Mapillary config file, set it now?") if create_config in ["y", "Y", "yes", "Yes"]: master_key = set_master_key() else: - create_config = raw_input( + create_config = input( "MAPAdmin section not in your global Mapillary config file, set it now?") if create_config in ["y", "Y", "yes", "Yes"]: master_key = set_master_key() else: - create_config = raw_input( + create_config = input( "Master upload key needs to be saved in the global Mapillary config file, which does not exist, create one now?") if create_config in ["y", "Y", "yes", "Yes"]: config.create_config(GLOBAL_CONFIG_FILEPATH) @@ -524,7 +524,7 @@ section = "MAPAdmin" if section not in config_object.sections(): config_object.add_section(section) - master_key = raw_input("Enter the master key : ") + master_key = input("Enter the master key : ") if master_key != "": config_object = config.set_user_items( config_object, section, {"MAPILLARY_SECRET_HASH": master_key}) @@ -534,9 +534,9 @@ def get_user_key(user_name): try: - req = urllib2.Request(USER_URL.format( - urllib2.quote(user_name), CLIENT_ID)) - resp = json.loads(urllib2.urlopen(req).read()) + req = urllib.request.Request(USER_URL.format( + urllib.parse.quote(user_name), CLIENT_ID)) + resp = json.loads(urllib.request.urlopen(req).read()) except: return None if not resp or 'key' not in resp[0]: @@ -548,9 +548,9 @@ def get_user_hashes(user_key, upload_token): user_permission_hash = "" user_signature_hash = "" - req = urllib2.Request(USER_UPLOAD_URL.format(user_key, CLIENT_ID)) + req = urllib.request.Request(USER_UPLOAD_URL.format(user_key, CLIENT_ID)) req.add_header('Authorization', 'Bearer {}'.format(upload_token)) - resp = json.loads(urllib2.urlopen(req).read()) + resp = json.loads(urllib.request.urlopen(req).read()) if 'images_hash' in resp: user_signature_hash = resp['images_hash'] if 'images_policy' in resp: @@ -560,9 +560,9 @@ def get_user(jwt): - req = urllib2.Request(ME_URL) + req = urllib.request.Request(ME_URL) req.add_header('Authorization', 'Bearer {}'.format(jwt)) - return json.loads(urllib2.urlopen(req).read()) + return json.loads(urllib.request.urlopen(req).read()) def upload_done_file(url, permission, signature, key=None, aws_key=None): @@ -588,34 +588,34 @@ # Initialize response before each attempt response = None try: - request = urllib2.Request(url, data=data, headers=headers) - response = urllib2.urlopen(request) + request = urllib.request.Request(url, data=data, headers=headers) + response = urllib.request.urlopen(request) if response.getcode() == 204: if displayed_upload_error == True: - print("Successful upload of {} on attempt {}".format( - s3_filename, attempt)) + print(("Successful upload of {} on attempt {}".format( + s3_filename, attempt))) break # attempts - except urllib2.HTTPError as e: - print("HTTP error: {} on {}, will attempt upload again for {} more times".format( - e, s3_filename, max_attempts - attempt - 1)) + except urllib.error.HTTPError as e: + print(("HTTP error: {} on {}, will attempt upload again for {} more times".format( + e, s3_filename, max_attempts - attempt - 1))) displayed_upload_error = True time.sleep(5) - except urllib2.URLError as e: - print("URL error: {} on {}, will attempt upload again for {} more times".format( - e, s3_filename, max_attempts - attempt - 1)) + except urllib.error.URLError as e: + print(("URL error: {} on {}, will attempt upload again for {} more times".format( + e, s3_filename, max_attempts - attempt - 1))) time.sleep(5) - except httplib.HTTPException as e: - print("HTTP exception: {} on {}, will attempt upload again for {} more times".format( - e, s3_filename, max_attempts - attempt - 1)) + except http.client.HTTPException as e: + print(("HTTP exception: {} on {}, will attempt upload again for {} more times".format( + e, s3_filename, max_attempts - attempt - 1))) time.sleep(5) except OSError as e: - print("OS error: {} on {}, will attempt upload again for {} more times".format( - e, s3_filename, max_attempts - attempt - 1)) + print(("OS error: {} on {}, will attempt upload again for {} more times".format( + e, s3_filename, max_attempts - attempt - 1))) time.sleep(5) except socket.timeout as e: # Specific timeout handling for Python 2.7 - print("Timeout error: {0}, will attempt upload again for {} more times".format( - s3_filename, max_attempts - attempt - 1)) + print(("Timeout error: {0}, will attempt upload again for {} more times".format( + s3_filename, max_attempts - attempt - 1))) finally: if response is not None: response.close() @@ -664,38 +664,38 @@ # Initialize response before each attempt response = None try: - request = urllib2.Request(url, data=data, headers=headers) - response = urllib2.urlopen(request) + request = urllib.request.Request(url, data=data, headers=headers) + response = urllib.request.urlopen(request) if response.getcode() == 204: create_upload_log(filepath_in, "upload_success") if displayed_upload_error == True: - print("Successful upload of {} on attempt {}".format( - filename, attempt)) + print(("Successful upload of {} on attempt {}".format( + filename, attempt))) else: create_upload_log(filepath_in, "upload_failed") break # attempts - except urllib2.HTTPError as e: - print("HTTP error: {} on {}, will attempt upload again for {} more times".format( - e, filename, max_attempts - attempt - 1)) + except urllib.error.HTTPError as e: + print(("HTTP error: {} on {}, will attempt upload again for {} more times".format( + e, filename, max_attempts - attempt - 1))) displayed_upload_error = True time.sleep(5) - except urllib2.URLError as e: - print("URL error: {} on {}, will attempt upload again for {} more times".format( - e, filename, max_attempts - attempt - 1)) + except urllib.error.URLError as e: + print(("URL error: {} on {}, will attempt upload again for {} more times".format( + e, filename, max_attempts - attempt - 1))) time.sleep(5) - except httplib.HTTPException as e: - print("HTTP exception: {} on {}, will attempt upload again for {} more times".format( - e, filename, max_attempts - attempt - 1)) + except http.client.HTTPException as e: + print(("HTTP exception: {} on {}, will attempt upload again for {} more times".format( + e, filename, max_attempts - attempt - 1))) time.sleep(5) except OSError as e: - print("OS error: {} on {}, will attempt upload again for {} more times".format( - e, filename, max_attempts - attempt - 1)) + print(("OS error: {} on {}, will attempt upload again for {} more times".format( + e, filename, max_attempts - attempt - 1))) time.sleep(5) except socket.timeout as e: # Specific timeout handling for Python 2.7 - print("Timeout error: {} (retrying), will attempt upload again for {} more times".format( - filename, max_attempts - attempt - 1)) + print(("Timeout error: {} (retrying), will attempt upload again for {} more times".format( + filename, max_attempts - attempt - 1))) finally: if response is not None: response.close() @@ -705,7 +705,7 @@ def ascii_encode_dict(data): def ascii_encode(x): return x.encode('ascii') - return dict(map(ascii_encode, pair) for pair in data.items()) + return dict(list(map(ascii_encode, pair)) for pair in list(data.items())) def upload_file_list_direct(file_list, number_threads=None, max_attempts=None, api_version=1.0): @@ -724,7 +724,7 @@ # start uploaders as daemon threads that can be stopped (ctrl-c) try: - print("Uploading with {} threads".format(number_threads)) + print(("Uploading with {} threads".format(number_threads))) for uploader in uploaders: uploader.daemon = True uploader.start() @@ -753,8 +753,8 @@ # start uploaders as daemon threads that can be stopped (ctrl-c) try: - print("Uploading {}. sequence with {} threads".format( - sequence_idx + 1, number_threads)) + print(("Uploading {}. sequence with {} threads".format( + sequence_idx + 1, number_threads))) for uploader in uploaders: uploader.daemon = True uploader.start() @@ -848,8 +848,8 @@ if not os.path.exists(no_gps_folder): os.mkdir(no_gps_folder) os.rename(video, no_gps_folder + os.path.basename(video)) - print( - "Skipping file {} due to file not containing gps data".format(video)) + print(( + "Skipping file {} due to file not containing gps data".format(video))) return True if os.path.basename(os.path.dirname(video)) != 'stationary': stationary_folder = os.path.dirname(video) + '/stationary/' @@ -858,7 +858,7 @@ os.rename(video, stationary_folder + os.path.basename(video)) os.rename(gpx_file_path, stationary_folder + os.path.basename(gpx_file_path)) - print("Skipping file {} due to camera being stationary".format(video)) + print(("Skipping file {} due to camera being stationary".format(video))) return True if not isStationaryVid: @@ -886,18 +886,18 @@ os.path.basename(video)) os.rename(gpx_file_path, night_time_folder + os.path.basename(gpx_file_path)) - print( - "Skipping file {} due to video being recorded at night (Before 9am or after 6pm)".format(video)) + print(( + "Skipping file {} due to video being recorded at night (Before 9am or after 6pm)".format(video))) return True except Exception as e: - print( - "Unable to determine time of day. Exception raised: {} \n Video will be uploaded".format(e)) + print(( + "Unable to determine time of day. Exception raised: {} \n Video will be uploaded".format(e))) return False def send_videos_for_processing(video_import_path, user_name, user_email=None, user_password=None, verbose=False, skip_subfolders=False, number_threads=None, max_attempts=None, organization_username=None, organization_key=None, private=False, master_upload=False, sampling_distance=2, filter_night_time=False): # safe checks if not os.path.isdir(video_import_path) and not (os.path.isfile(video_import_path) and video_import_path.lower().endswith("mp4")): - print("video import path {} does not exist or is invalid, exiting...".format( - video_import_path)) + print(("video import path {} does not exist or is invalid, exiting...".format( + video_import_path))) sys.exit(1) # User Authentication credentials = None @@ -909,7 +909,7 @@ except: pass if credentials == None or "user_upload_token" not in credentials or "user_permission_hash" not in credentials or "user_signature_hash" not in credentials:RefactoringTool: Refactored ./mapillary_tools/utils.py RefactoringTool: No changes to ./mapillary_tools/camera_support/prepare_blackvue_videos.py RefactoringTool: No changes to ./mapillary_tools/commands/__init__.py RefactoringTool: No changes to ./mapillary_tools/commands/authenticate.py RefactoringTool: Refactored ./mapillary_tools/commands/download.py RefactoringTool: No changes to ./mapillary_tools/commands/exif_insert.py RefactoringTool: No changes to ./mapillary_tools/commands/extract_geotag_data.py RefactoringTool: No changes to ./mapillary_tools/commands/extract_import_meta_data.py RefactoringTool: No changes to ./mapillary_tools/commands/extract_sequence_data.py RefactoringTool: No changes to ./mapillary_tools/commands/extract_upload_params.py RefactoringTool: No changes to ./mapillary_tools/commands/extract_user_data.py RefactoringTool: No changes to ./mapillary_tools/commands/interpolate.py RefactoringTool: Refactored ./mapillary_tools/commands/post_process.py RefactoringTool: Refactored ./mapillary_tools/commands/process.py RefactoringTool: Refactored ./mapillary_tools/commands/process_and_upload.py - print("Error, user authentication failed for user " + user_name) + print(("Error, user authentication failed for user " + user_name)) sys.exit(1) user_permission_hash = credentials["user_permission_hash"] @@ -935,7 +935,7 @@ max_attempts = MAX_ATTEMPTS for video in tqdm(all_videos, desc="Uploading videos for processing"): - print("Preparing video {} for upload".format(os.path.basename(video))) + print(("Preparing video {} for upload".format(os.path.basename(video)))) if not filter_video_before_upload(video,filter_night_time): video_start_time = get_video_start_time_blackvue(video) # Correct timestamp in case camera time zone is not set correctly. If timestamp is not UTC, sync with GPS track will fail. @@ -1000,10 +1000,10 @@ create_upload_log(video, "upload_success") break except requests.exceptions.HTTPError as e: - print("Upload error: {} on {}, will attempt to upload again for {} more times".format(e, filename, max_attempts - attempt - 1)) + print(("Upload error: {} on {}, will attempt to upload again for {} more times".format(e, filename, max_attempts - attempt - 1))) time.sleep(5) except requests.exceptions.ConnectionError as e: - print("Upload error: {} on {}, will attempt to upload again for {} more times".format(e, filename, max_attempts - attempt - 1)) + print(("Upload error: {} on {}, will attempt to upload again for {} more times".format(e, filename, max_attempts - attempt - 1))) time.sleep(5) finally: if response is not None: @@ -1028,13 +1028,13 @@ '/uploaded/' + os.path.basename(video)) os.rename(gpx_path, os.path.dirname(video) + '/uploaded/' + os.path.basename(gpx_path)) - print("Uploaded {} successfully".format(os.path.basename(video))) + print(("Uploaded {} successfully".format(os.path.basename(video)))) break except requests.exceptions.HTTPError as e: - print("Upload error: {} on {}, will attempt to upload again for {} more times".format(e, filename, max_attempts - attempt - 1)) + print(("Upload error: {} on {}, will attempt to upload again for {} more times".format(e, filename, max_attempts - attempt - 1))) time.sleep(5) except requests.exceptions.ConnectionError as e: - print("Upload error: {} on {}, will attempt to upload again for {} more times".format(e, filename, max_attempts - attempt - 1)) + print(("Upload error: {} on {}, will attempt to upload again for {} more times".format(e, filename, max_attempts - attempt - 1))) time.sleep(5) finally: if response is not None: --- ./mapillary_tools/utils.py (original) +++ ./mapillary_tools/utils.py (refactored) @@ -4,5 +4,5 @@ return string.decode(i) except UnicodeDecodeError: pass - print('cannot decode string: %s' % (string)) + print(('cannot decode string: %s' % (string))) return string.decode('utf8', errors='replace') --- ./mapillary_tools/commands/download.py (original) +++ ./mapillary_tools/commands/download.py (refactored) @@ -18,7 +18,7 @@ def run(self, args): vars_args = vars(args) - download(**({k: v for k, v in vars_args.iteritems() + download(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(download).args})) print("Download done.") --- ./mapillary_tools/commands/post_process.py (original) +++ ./mapillary_tools/commands/post_process.py (refactored) @@ -42,5 +42,5 @@ vars_args = vars(args) - post_process(**({k: v for k, v in vars_args.iteritems() + post_process(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(post_process).args})) --- ./mapillary_tools/commands/process.py (original) +++ ./mapillary_tools/commands/process.py (refactored) @@ -135,25 +135,25 @@ vars_args["device_make"] = "Blackvue" if "device_make" in vars_args and vars_args["device_make"] and vars_args["device_make"].lower() == "blackvue": vars_args["duplicate_angle"] = 360 - process_user_properties(**({k: v for k, v in vars_args.iteritems() + process_user_properties(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_user_properties).args})) process_import_meta_properties( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(process_import_meta_properties).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_import_meta_properties).args})) process_geotag_properties( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(process_geotag_properties).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_geotag_properties).args})) process_sequence_properties( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(process_sequence_properties).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_sequence_properties).args})) - process_upload_params(**({k: v for k, v in vars_args.iteritems() + process_upload_params(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_upload_params).args})) - insert_MAPJson(**({k: v for k, v in vars_args.iteritems() + insert_MAPJson(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(insert_MAPJson).args})) print("Process done.") - post_process(**({k: v for k, v in vars_args.iteritems() + post_process(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(post_process).args})) --- ./mapillary_tools/commands/process_and_upload.py (original) +++ ./mapillary_tools/commands/process_and_upload.py (refactored) @@ -140,27 +140,27 @@ if "device_make" in vars_args and vars_args["device_make"] and vars_args["device_make"].lower() == "blackvue": vars_args["duplicate_angle"] = 360 - process_user_properties(**({k: v for k, v in vars_args.iteritems() + process_user_properties(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_user_properties).args})) process_import_meta_properties( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(process_import_meta_properties).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_import_meta_properties).args})) process_geotag_properties( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(process_geotag_properties).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_geotag_properties).args})) process_sequence_properties( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(process_sequence_properties).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_sequence_properties).args})) - process_upload_params(**({k: v for k, v in vars_args.iteritems() + process_upload_params(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_upload_params).args})) - insert_MAPJson(**({k: v for k, v in vars_args.iteritems() + insert_MAPJson(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(insert_MAPJson).args})) print("Process done.") - upload(**({k: v for k, v in vars_args.iteritems()RefactoringTool: No changes to ./mapillary_tools/commands/process_csv.py RefactoringTool: No changes to ./mapillary_tools/commands/sample_video.py RefactoringTool: Refactored ./mapillary_tools/commands/send_videos_for_processing.py RefactoringTool: Refactored ./mapillary_tools/commands/upload.py RefactoringTool: Refactored ./mapillary_tools/commands/video_process.py RefactoringTool: Refactored ./mapillary_tools/commands/video_process_and_upload.py RefactoringTool: No changes to ./mapillary_tools/test/generate_test_image.py RefactoringTool: Refactored ./mapillary_tools/test/test_exifedit.py RefactoringTool: Refactored ./mapillary_tools/test/test_exifread.py RefactoringTool: No changes to ./pyinstaller/hooks/hook-urllib2.py RefactoringTool: No changes to ./pyinstaller/runtime-hooks/ssl.py RefactoringTool: No changes to ./tests/integration/mapillary_tools_process_images_provider/test_process_images_provider.py RefactoringTool: Refactored ./tests/utils/config.py RefactoringTool: Files that were modified: RefactoringTool: ./setup.py RefactoringTool: ./bin/download_images.py RefactoringTool: ./mapillary_tools/__init__.py RefactoringTool: ./mapillary_tools/apply_camera_specific_config.py RefactoringTool: ./mapillary_tools/config.py RefactoringTool: ./mapillary_tools/download.py RefactoringTool: ./mapillary_tools/edit_config.py RefactoringTool: ./mapillary_tools/exif_aux.py RefactoringTool: ./mapillary_tools/exif_read.py RefactoringTool: ./mapillary_tools/exif_write.py RefactoringTool: ./mapillary_tools/ffmpeg.py RefactoringTool: ./mapillary_tools/ffprobe.py RefactoringTool: ./mapillary_tools/geo.py RefactoringTool: ./mapillary_tools/gpmf.py RefactoringTool: ./mapillary_tools/gps_parser.py RefactoringTool: ./mapillary_tools/gpx_from_blackvue.py RefactoringTool: ./mapillary_tools/gpx_from_exif.py RefactoringTool: ./mapillary_tools/gpx_from_gopro.py RefactoringTool: ./mapillary_tools/insert_MAPJson.py RefactoringTool: ./mapillary_tools/interpolation.py RefactoringTool: ./mapillary_tools/ipc.py RefactoringTool: ./mapillary_tools/post_process.py RefactoringTool: ./mapillary_tools/process_csv.py RefactoringTool: ./mapillary_tools/process_geotag_properties.py RefactoringTool: ./mapillary_tools/process_import_meta_properties.py RefactoringTool: ./mapillary_tools/process_sequence_properties.py RefactoringTool: ./mapillary_tools/process_upload_params.py RefactoringTool: ./mapillary_tools/process_user_properties.py RefactoringTool: ./mapillary_tools/process_video.py RefactoringTool: ./mapillary_tools/processing.py RefactoringTool: ./mapillary_tools/upload.py RefactoringTool: ./mapillary_tools/uploader.py RefactoringTool: ./mapillary_tools/utils.py RefactoringTool: ./mapillary_tools/camera_support/prepare_blackvue_videos.py RefactoringTool: ./mapillary_tools/commands/__init__.py RefactoringTool: ./mapillary_tools/commands/authenticate.py RefactoringTool: ./mapillary_tools/commands/download.py RefactoringTool: ./mapillary_tools/commands/exif_insert.py RefactoringTool: ./mapillary_tools/commands/extract_geotag_data.py RefactoringTool: ./mapillary_tools/commands/extract_import_meta_data.py RefactoringTool: ./mapillary_tools/commands/extract_sequence_data.py RefactoringTool: ./mapillary_tools/commands/extract_upload_params.py RefactoringTool: ./mapillary_tools/commands/extract_user_data.py RefactoringTool: ./mapillary_tools/commands/interpolate.py RefactoringTool: ./mapillary_tools/commands/post_process.py RefactoringTool: ./mapillary_tools/commands/process.py RefactoringTool: ./mapillary_tools/commands/process_and_upload.py RefactoringTool: ./mapillary_tools/commands/process_csv.py RefactoringTool: ./mapillary_tools/commands/sample_video.py RefactoringTool: ./mapillary_tools/commands/send_videos_for_processing.py RefactoringTool: ./mapillary_tools/commands/upload.py RefactoringTool: ./mapillary_tools/commands/video_process.py + upload(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(upload).args})) - post_process(**({k: v for k, v in vars_args.iteritems() + post_process(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(post_process).args})) --- ./mapillary_tools/commands/send_videos_for_processing.py (original) +++ ./mapillary_tools/commands/send_videos_for_processing.py (refactored) @@ -40,4 +40,4 @@ def run(self, args): vars_args = vars(args) send_videos_for_processing( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(send_videos_for_processing).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(send_videos_for_processing).args})) --- ./mapillary_tools/commands/upload.py (original) +++ ./mapillary_tools/commands/upload.py (refactored) @@ -46,8 +46,8 @@ vars_args = vars(args) - upload(**({k: v for k, v in vars_args.iteritems() + upload(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(upload).args})) - post_process(**({k: v for k, v in vars_args.iteritems() + post_process(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(post_process).args})) --- ./mapillary_tools/commands/video_process.py (original) +++ ./mapillary_tools/commands/video_process.py (refactored) @@ -143,28 +143,28 @@ vars_args = apply_camera_specific_config(vars_args) - sample_video(**({k: v for k, v in vars_args.iteritems() + sample_video(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(sample_video).args})) - process_user_properties(**({k: v for k, v in vars_args.iteritems() + process_user_properties(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_user_properties).args})) process_import_meta_properties( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(process_import_meta_properties).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_import_meta_properties).args})) process_geotag_properties( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(process_geotag_properties).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_geotag_properties).args})) process_sequence_properties( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(process_sequence_properties).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_sequence_properties).args})) - process_upload_params(**({k: v for k, v in vars_args.iteritems() + process_upload_params(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_upload_params).args})) - insert_MAPJson(**({k: v for k, v in vars_args.iteritems() + insert_MAPJson(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(insert_MAPJson).args})) print("Process done.") - post_process(**({k: v for k, v in vars_args.iteritems() + post_process(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(post_process).args})) --- ./mapillary_tools/commands/video_process_and_upload.py (original) +++ ./mapillary_tools/commands/video_process_and_upload.py (refactored) @@ -150,31 +150,31 @@ if "device_make" in vars_args and vars_args["device_make"] and vars_args["device_make"].lower() == "blackvue": vars_args["duplicate_angle"] = 360 - sample_video(**({k: v for k, v in vars_args.iteritems() + sample_video(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(sample_video).args})) - process_user_properties(**({k: v for k, v in vars_args.iteritems() + process_user_properties(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_user_properties).args})) process_import_meta_properties( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(process_import_meta_properties).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_import_meta_properties).args})) process_geotag_properties( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(process_geotag_properties).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_geotag_properties).args})) process_sequence_properties( - **({k: v for k, v in vars_args.iteritems() if k in inspect.getargspec(process_sequence_properties).args})) + **({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_sequence_properties).args})) - process_upload_params(**({k: v for k, v in vars_args.iteritems() + process_upload_params(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(process_upload_params).args})) - insert_MAPJson(**({k: v for k, v in vars_args.iteritems() + insert_MAPJson(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(insert_MAPJson).args})) print("Process done.") - upload(**({k: v for k, v in vars_args.iteritems() + upload(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(upload).args})) - post_process(**({k: v for k, v in vars_args.iteritems() + post_process(**({k: v for k, v in vars_args.items() if k in inspect.getargspec(post_process).args})) --- ./mapillary_tools/test/test_exifedit.py (original) +++ ./mapillary_tools/test/test_exifedit.py (refactored) @@ -22,8 +22,8 @@ # more info on the standard exif tags # https://sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html -EXIF_PRIMARY_TAGS_DICT = {y: x for x, y in ExifTags.TAGS.iteritems()} -EXIF_GPS_TAGS_DICT = {y: x for x, y in ExifTags.GPSTAGS.iteritems()} +EXIF_PRIMARY_TAGS_DICT = {y: x for x, y in ExifTags.TAGS.items()} +EXIF_GPS_TAGS_DICT = {y: x for x, y in ExifTags.GPSTAGS.items()} def load_exif(filename=EMPTY_EXIF_FILE_TEST): --- ./mapillary_tools/test/test_exifread.py (original) +++ ./mapillary_tools/test/test_exifread.py (refactored) @@ -15,8 +15,8 @@ # more info on the standard exif tags # https://sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html -EXIF_PRIMARY_TAGS_DICT = {y: x for x, y in ExifTags.TAGS.iteritems()} -EXIF_GPS_TAGS_DICT = {y: x for x, y in ExifTags.GPSTAGS.iteritems()} +EXIF_PRIMARY_TAGS_DICT = {y: x for x, y in ExifTags.TAGS.items()} +EXIF_GPS_TAGS_DICT = {y: x for x, y in ExifTags.GPSTAGS.items()} def gps_to_decimal(value, ref): --- ./tests/utils/config.py (original) +++ ./tests/utils/config.py (refactored) @@ -38,19 +38,19 @@ try: config.add_section(user_name) except: - print("Error adding new user section, for user_name " + user_name) + print(("Error adding new user section, for user_name " + user_name)) else: - print("Error, user " + user_name + " already exists") + print(("Error, user " + user_name + " already exists")) save_config(config, config_path) def set_user_items(config, user_name, user_items): - for key in user_items.keys(): + for key in list(user_items.keys()): try: config.set(user_name, key, user_items[key]) except: - print("Error setting config key " + key + " with value " + - str(user_items[key]) + " for user_name " + user_name) + print(("Error setting config key " + key + " with value " + + str(user_items[key]) + " for user_name " + user_name)) return config RefactoringTool: ./mapillary_tools/commands/video_process_and_upload.py RefactoringTool: ./mapillary_tools/test/generate_test_image.py RefactoringTool: ./mapillary_tools/test/test_exifedit.py RefactoringTool: ./mapillary_tools/test/test_exifread.py RefactoringTool: ./pyinstaller/hooks/hook-urllib2.py RefactoringTool: ./pyinstaller/runtime-hooks/ssl.py RefactoringTool: ./tests/integration/mapillary_tools_process_images_provider/test_process_images_provider.py RefactoringTool: ./tests/utils/config.py + sed -i 's/==[0-9.]*//' setup.py + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.tXYhBt + umask 022 + cd /builddir/build/BUILD + cd mapillary_tools-0.5.0 + CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' + /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s' running build running build_py creating build creating build/lib creating build/lib/mapillary_tools copying mapillary_tools/utils.py -> build/lib/mapillary_tools copying mapillary_tools/uploader.py -> build/lib/mapillary_tools copying mapillary_tools/upload.py -> build/lib/mapillary_tools copying mapillary_tools/processing.py -> build/lib/mapillary_tools copying mapillary_tools/process_video.py -> build/lib/mapillary_tools copying mapillary_tools/process_user_properties.py -> build/lib/mapillary_tools copying mapillary_tools/process_upload_params.py -> build/lib/mapillary_tools copying mapillary_tools/process_sequence_properties.py -> build/lib/mapillary_tools copying mapillary_tools/process_import_meta_properties.py -> build/lib/mapillary_tools copying mapillary_tools/process_geotag_properties.py -> build/lib/mapillary_tools copying mapillary_tools/process_csv.py -> build/lib/mapillary_tools copying mapillary_tools/post_process.py -> build/lib/mapillary_tools copying mapillary_tools/ipc.py -> build/lib/mapillary_tools copying mapillary_tools/interpolation.py -> build/lib/mapillary_tools copying mapillary_tools/insert_MAPJson.py -> build/lib/mapillary_tools copying mapillary_tools/gpx_from_gopro.py -> build/lib/mapillary_tools copying mapillary_tools/gpx_from_exif.py -> build/lib/mapillary_tools copying mapillary_tools/gpx_from_blackvue.py -> build/lib/mapillary_tools copying mapillary_tools/gps_parser.py -> build/lib/mapillary_tools copying mapillary_tools/gpmf.py -> build/lib/mapillary_tools copying mapillary_tools/geo.py -> build/lib/mapillary_tools copying mapillary_tools/ffprobe.py -> build/lib/mapillary_tools copying mapillary_tools/ffmpeg.py -> build/lib/mapillary_tools copying mapillary_tools/exif_write.py -> build/lib/mapillary_tools copying mapillary_tools/exif_read.py -> build/lib/mapillary_tools copying mapillary_tools/exif_aux.py -> build/lib/mapillary_tools copying mapillary_tools/error.py -> build/lib/mapillary_tools copying mapillary_tools/edit_config.py -> build/lib/mapillary_tools copying mapillary_tools/download.py -> build/lib/mapillary_tools copying mapillary_tools/config.py -> build/lib/mapillary_tools copying mapillary_tools/apply_camera_specific_config.py -> build/lib/mapillary_tools copying mapillary_tools/__init__.py -> build/lib/mapillary_tools creating build/lib/mapillary_tools/commands copying mapillary_tools/commands/video_process_and_upload.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/video_process.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/upload.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/send_videos_for_processing.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/sample_video.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/process_csv.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/process_and_upload.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/process.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/post_process.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/interpolate.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/extract_user_data.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/extract_upload_params.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/extract_sequence_data.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/extract_import_meta_data.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/extract_geotag_data.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/exif_insert.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/download.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/authenticate.py -> build/lib/mapillary_tools/commands copying mapillary_tools/commands/__init__.py -> build/lib/mapillary_tools/commands creating build/lib/mapillary_tools/camera_support copying mapillary_tools/camera_support/prepare_blackvue_videos.py -> build/lib/mapillary_tools/camera_support copying mapillary_tools/camera_support/__init__.py -> build/lib/mapillary_tools/camera_support running build_scripts creating build/scripts-3.8 copying and adjusting bin/mapillary_tools -> build/scripts-3.8 changing mode of build/scripts-3.8/mapillary_tools from 644 to 755 + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.j9d0ax + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64 '!=' / ']' + rm -rf /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64 ++ dirname /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64 + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64 + cd mapillary_tools-0.5.0 + CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' + /usr/bin/python3 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64 running install running install_lib creating /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr creating /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib creating /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8 creating /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages creating /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools creating /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/camera_support copying build/lib/mapillary_tools/camera_support/__init__.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/camera_support copying build/lib/mapillary_tools/camera_support/prepare_blackvue_videos.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/camera_support creating /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/__init__.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/authenticate.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/download.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/exif_insert.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/extract_geotag_data.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/extract_import_meta_data.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/extract_sequence_data.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/extract_upload_params.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/extract_user_data.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/interpolate.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/post_process.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/process.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/process_and_upload.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/process_csv.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/sample_video.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/send_videos_for_processing.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/upload.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/video_process.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/commands/video_process_and_upload.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands copying build/lib/mapillary_tools/__init__.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/apply_camera_specific_config.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/config.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/download.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/edit_config.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/error.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/exif_aux.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/exif_read.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/exif_write.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/ffmpeg.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/ffprobe.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/geo.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/gpmf.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/gps_parser.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/gpx_from_blackvue.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/gpx_from_exif.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/gpx_from_gopro.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/insert_MAPJson.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/interpolation.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/ipc.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/post_process.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/process_csv.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/process_geotag_properties.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/process_import_meta_properties.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/process_sequence_properties.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/process_upload_params.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/process_user_properties.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/process_video.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/processing.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/upload.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/uploader.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools copying build/lib/mapillary_tools/utils.py -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/camera_support/__init__.py to __init__.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/camera_support/prepare_blackvue_videos.py to prepare_blackvue_videos.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/__init__.py to __init__.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/authenticate.py to authenticate.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/download.py to download.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/exif_insert.py to exif_insert.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/extract_geotag_data.py to extract_geotag_data.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/extract_import_meta_data.py to extract_import_meta_data.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/extract_sequence_data.py to extract_sequence_data.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/extract_upload_params.py to extract_upload_params.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/extract_user_data.py to extract_user_data.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/interpolate.py to interpolate.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/post_process.py to post_process.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/process.py to process.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/process_and_upload.py to process_and_upload.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/process_csv.py to process_csv.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/sample_video.py to sample_video.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/send_videos_for_processing.py to send_videos_for_processing.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/upload.py to upload.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/video_process.py to video_process.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/commands/video_process_and_upload.py to video_process_and_upload.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/__init__.py to __init__.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/apply_camera_specific_config.py to apply_camera_specific_config.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/config.py to config.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/download.py to download.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/edit_config.py to edit_config.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/error.py to error.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/exif_aux.py to exif_aux.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/exif_read.py to exif_read.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/exif_write.py to exif_write.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/ffmpeg.py to ffmpeg.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/ffprobe.py to ffprobe.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/geo.py to geo.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/gpmf.py to gpmf.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/gps_parser.py to gps_parser.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/gpx_from_blackvue.py to gpx_from_blackvue.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/gpx_from_exif.py to gpx_from_exif.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/gpx_from_gopro.py to gpx_from_gopro.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/insert_MAPJson.py to insert_MAPJson.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/interpolation.py to interpolation.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/ipc.py to ipc.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/post_process.py to post_process.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/process_csv.py to process_csv.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/process_geotag_properties.py to process_geotag_properties.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/process_import_meta_properties.py to process_import_meta_properties.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/process_sequence_properties.py to process_sequence_properties.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/process_upload_params.py to process_upload_params.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/process_user_properties.py to process_user_properties.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/process_video.py to process_video.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/processing.py to processing.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/upload.py to upload.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/uploader.py to uploader.cpython-38.pyc byte-compiling /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools/utils.py to utils.cpython-38.pyc writing byte-compilation script '/tmp/tmp8tx20o4r.py' /usr/bin/python3 /tmp/tmp8tx20o4r.py /usr/lib/python3.8/site-packages/mapillary_tools/exif_read.py:163: SyntaxWarning: "is" with a literal. Did you mean "=="? removing /tmp/tmp8tx20o4r.py running install_egg_info running egg_info creating mapillary_tools.egg-info writing mapillary_tools.egg-info/PKG-INFO writing dependency_links to mapillary_tools.egg-info/dependency_links.txt writing requirements to mapillary_tools.egg-info/requires.txt writing top-level names to mapillary_tools.egg-info/top_level.txt writing manifest file 'mapillary_tools.egg-info/SOURCES.txt' reading manifest file 'mapillary_tools.egg-info/SOURCES.txt' writing manifest file 'mapillary_tools.egg-info/SOURCES.txt' Copying mapillary_tools.egg-info to /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8/site-packages/mapillary_tools-0.5.0-py3.8.egg-info running install_scripts creating /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/bin copying build/scripts-3.8/mapillary_tools -> /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/bin changing mode of /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/bin/mapillary_tools to 755 /usr/lib/python3.8/site-packages/mapillary_tools/exif_read.py:163: SyntaxWarning: "is" with a literal. Did you mean "=="? + rm -rfv /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/bin/__pycache__ + /usr/lib/rpm/find-debuginfo.sh -j4 --strict-build-id -m -i --build-id-seed 0.5.0-1.fc33 --unique-debug-suffix -0.5.0-1.fc33.aarch64 --unique-debug-src-base mapillary_tools-0.5.0-1.fc33.aarch64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/mapillary_tools-0.5.0 find: 'debug': No such file or directory + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/redhat/brp-python-bytecompile /usr/bin/python 1 0 Bytecompiling .py files below /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/lib/python3.8 using /usr/bin/python3.8 /usr/lib/python3.8/site-packages/mapillary_tools/exif_read.py:163: SyntaxWarning: "is" with a literal. Did you mean "=="? /usr/lib/python3.8/site-packages/mapillary_tools/exif_read.py:163: SyntaxWarning: "is" with a literal. Did you mean "=="? + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-mangle-shebangs Processing files: python3-mapillary_tools-0.5.0-1.fc33.noarch Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.cf3Irt + umask 022 + cd /builddir/build/BUILD + cd mapillary_tools-0.5.0 + DOCDIR=/builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/share/doc/python3-mapillary_tools + export LC_ALL=C + LC_ALL=C + export DOCDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/share/doc/python3-mapillary_tools + cp -pr README.md /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/share/doc/python3-mapillary_tools + cp -pr README_osx_package.txt /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/share/doc/python3-mapillary_tools + RPM_EC=0 ++ jobs -p + exit 0 Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.FQqT0w + umask 022 + cd /builddir/build/BUILD + cd mapillary_tools-0.5.0 + LICENSEDIR=/builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/share/licenses/python3-mapillary_tools + export LC_ALL=C + LC_ALL=C + export LICENSEDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/share/licenses/python3-mapillary_tools + cp -pr LICENSE /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/share/licenses/python3-mapillary_tools + cp -pr licenses.csv /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64/usr/share/licenses/python3-mapillary_tools + RPM_EC=0 ++ jobs -p + exit 0 Provides: python-mapillary_tools = 0.5.0-1.fc33 python-mapillary_tools = 0.5.0-1.fc33 python3-mapillary_tools = 0.5.0-1.fc33 python3.8dist(mapillary-tools) = 0.5 python38-mapillary_tools = 0.5.0-1.fc33 python38-mapillary_tools = 0.5.0-1.fc33 python3dist(mapillary-tools) = 0.5 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: /usr/bin/python3 python(abi) = 3.8 python3.8dist(exifread) python3.8dist(gpxpy) python3.8dist(pillow) python3.8dist(pymp4) python3.8dist(pynmea2) python3.8dist(pytest) python3.8dist(python-dateutil) python3.8dist(pytz) python3.8dist(pyyaml) python3.8dist(requests) python3.8dist(tqdm) python3.8dist(tzwhere) Obsoletes: python-mapillary_tools < 0.5.0-1.fc33 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64 Wrote: /builddir/build/RPMS/python3-mapillary_tools-0.5.0-1.fc33.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.G6tbYs + umask 022 + cd /builddir/build/BUILD + cd mapillary_tools-0.5.0 + /usr/bin/rm -rf /builddir/build/BUILDROOT/mapillary_tools-0.5.0-1.fc33.aarch64 + RPM_EC=0 ++ jobs -p + exit 0 Child return code was: 0