Thank you for posting this, it seems like after an update something broke. I believe the method featurelayer.attachments.download is returning a list instead of a string. TypeError Traceback (most recent call last) D:\spotted_lantern_fly.py in <module>() 134 currentAttachmentPath = featureLayer.attachments.download(oid=currentObjectId, attachment_id=attachmentId, save_path=featureLayerFolder) 135 #Rename to ensure file name is unique --> 136 renameFile(currentAttachmentPath, newAttachmentPath) 137 downloadCounter += 1 138 downloadSizeCounter += attachmentSize D:\spotted_lantern_fly.py in renameFile(currentAttachmentPath, newAttachmentPath) 43 #Rename file - ensure new attachment path does not exist already 44 if not os.path.exists(newAttachmentPath): ---> 45 os.replace(currentAttachmentPath, newAttachmentPath) 46 logger.info('{} being renamed as {}'.format(currentAttachmentPath, newAttachmentPath)) 47 else: TypeError: replace: src should be string, bytes or os.PathLike, not list I've done some research but cant find figure out how to provide a string. Ive tried replace, rename, renames Is this something anyone else is experiencing and any ideas on how to fix?
... View more