Python 使用gedit打开下载路径的文本文件时出现问题

Python 使用gedit打开下载路径的文本文件时出现问题,python,nexus,Python,Nexus,在从nexus下载依赖项之后,我有了一个下载路径来存放数据,但是我无法打开文件,因为它没有响应,为什么会这样 for item in data["items"]: for asset in item["assets"]: fileurl = asset["downloadUrl"] print(fileurl) downloadPath = '/

在从nexus下载依赖项之后,我有了一个下载路径来存放数据,但是我无法打开文件,因为它没有响应,为什么会这样

  for item in data["items"]:
     for asset in item["assets"]:
             fileurl = asset["downloadUrl"]
             print(fileurl)
             downloadPath = '/home/centos/'
             filename = downloadPath + fileurl.split('/')[-1]# '\' for Windows
             outfile = open(filename, "w")
             outfile.write(str(urllib.request.urlopen(fileurl).read()))
             outfile.close()
             if data["continuationToken"] is None:
                sys.exit()
             else:
             #construct pagination url and loop
                url = baseurl + 'components?continuationToken=' + data["continuationToken"] + '&repository=' + downloadRepository
             return

错误消息是什么?我试图打开文件中的文本文件,但根本没有响应。没有错误消息,我无法打开它,文件大小是7.0MBDo你的意思是,你的代码可以工作,但当你试图用编辑器(Gedit)打开下载的文件时,它只是挂起。?没错。等待了一段时间后,它开始在文本文件中下载。我仍然不明白你在尝试什么,还有什么问题。请尽量详细阐述你的问题。