I am trying to run a python script to download(ScanNet data) but this error arises and I don't know what to do !
Error message:
C:\Users\youss>python download-scannet.py --out_dir C:\Users\youss\scannet --tf_semantic
By pressing any key to continue you confirm that you have agreed to the ScanNet terms of use as described
a
Traceback (most recent call last):
File "C:\Users\youss\download-scannet.py", line 232, in <module>
if __name__ == "__main__": main()
File "C:\Users\youss\download-scannet.py", line 160, in main
out_dir_scans = os.path.join(args.out_dir, 'scans')
AttributeError: 'Namespace' object has no attribute 'out_dir'
lines 160,161,162:
out_dir_scans = os.path.join(args.out_dir, 'scans')
out_dir_test_scans = os.path.join(args.out_dir, 'scans_test')
out_dir_tasks = os.path.join(args.out_dir, 'tasks')
I am using urllib.request
Related
I was hoping somebody could help me figure out why I am getting this error when trying to login through the Google Voice API. I tried substituting the usr and pwd variables with the string literals and still got the same error. Please help!
from googlevoice import Voice
import keyring
if __name__ == '__main__':
gv = Voice()
usr = keyring.get_password('2', '2')
pwd = keyring.get_password('1', '1')
client = gv.login(usr,pwd)
Throws the following error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "/Users/<usrname>/workingProjects/<projectname>/lib/python3.10/site-packages/googlevoice/voice.py", line 76, in login
).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
I cannot run automate script (using Robot Framework) and got error
Traceback (most recent call last):
File "c:\python27\lib\site.py", line 539, in <module>
main()
File "c:\python27\lib\site.py", line 518, in main
known_paths = removeduppaths()
File "c:\python27\lib\site.py", line 110, in removeduppaths
dir, dircase = makepath(dir)
File "c:\python27\lib\site.py", line 80, in makepath
dir = os.path.join(*paths)
AttributeError: 'module' object has no attribute 'path'
I have no idea what happened. Because before, it can run normally. I have been searching online but to no avail. Can't figure out what is causing this message and how to solve it.
when i tried to run this code, i got the "AttributeError" but idk why? please help me.
import os
import random
from moviepy.editor import *
List_image = os.listdir("müzik\kapaklar")
kapak_num = random.sample(range(1,len(List_image)+1),len(List_image))
List_songs = os.listdir("müzik\hazırlanacaklar")
for x in range(len(List_songs)):
songs = List_songs[x+1]
kapak = List_image[kapak_num[x+1]]
audio = AudioFileClip(songs) ### problem is here ###
image = ImageClip(kapak).set_duration(audio.duration)
video = image.set_audio(audio)
outfile = f"müzik\yapılanlar\%n_with_image.mp4",songs
video.write_videofile(outfile, fps=1)
error message:
C:\Users\erkan\Desktop\ChatCop\venv\Scripts\python.exe "C:/Users/erkan/Desktop/ChatCop/deus ex machina.py"
Traceback (most recent call last):
File "C:/Users/erkan/Desktop/ChatCop/deus ex machina.py", line 15, in <module>
audio = AudioFileClip(songs) # sıkıntı burada
File "C:\Users\erkan\Desktop\ChatCop\venv\lib\site-packages\moviepy\audio\io\AudioFileClip.py", line 72, in __init__
buffersize=buffersize)
File "C:\Users\erkan\Desktop\ChatCop\venv\lib\site-packages\moviepy\audio\io\readers.py", line 50, in __init__
infos = ffmpeg_parse_infos(filename)
File "C:\Users\erkan\Desktop\ChatCop\venv\lib\site-packages\moviepy\video\io\ffmpeg_reader.py", line 276, in ffmpeg_parse_infos
"path.")%filename)
OSError: MoviePy error: the file 70s Japanese Jazz Mix (Rare Groove, Jazz-Funk, Hard Bop, Modal, Fusion, Breaks).mp3 could not be found!
Please check that you entered the correct path.
Exception ignored in: <bound method AudioFileClip.__del__ of <moviepy.audio.io.AudioFileClip.AudioFileClip object at 0x0000026210D45710>>
Traceback (most recent call last):
File "C:\Users\erkan\Desktop\ChatCop\venv\lib\site-packages\moviepy\audio\io\AudioFileClip.py", line 94, in __del__
self.close()
File "C:\Users\erkan\Desktop\ChatCop\venv\lib\site-packages\moviepy\audio\io\AudioFileClip.py", line 89, in close
if self.reader:
AttributeError: 'AudioFileClip' object has no attribute 'reader'
Process finished with exit code 1
i'm working on an virtualbox VM, and i use to build an docker image with a python script using a docker sdk client. here is the code:
try:
#print(os.environ)
client = docker.from_env()
# building the base image
image=client.images.build(path=os.getcwd(), dockerfile=os.getcwd()+"/Dockerfile", tag="xlrelease/builder", nocache=True, forcerm=True, use_config_proxy=True)
except Exception as er:
print(er)
And i have the following exception:
'NoneType' object has no attribute 'setdefault'
After investigate, i discover that it's when i add the ## use_config_proxy=True ## parameter, the error appear.
Could someone help me fix this isssue ?
the Traceback was:
Traceback (most recent call last):
File "build.py", line 41, in <module>
image=client.images.build(path=os.getcwd(), dockerfile=os.getcwd()+"/Dockerfile", tag="xlrelease/builder", nocache=True, forcerm=True, use_config_proxy=True)
File "/usr/local/python3.7.3/lib/python3.7/site-packages/docker/models/images.py", line 279, in build
resp = self.client.api.build(**kwargs)
File "/usr/local/python3.7.3/lib/python3.7/site-packages/docker/api/build.py", line 179, in build
buildargs.setdefault(k, v)
AttributeError: 'NoneType' object has no attribute 'setdefault'
i solved the issue by finding the full traceback:
Traceback (most recent call last):
File "build.py", line 41, in <module>
image=client.images.build(path=os.getcwd(), dockerfile=os.getcwd()+"/Dockerfile", tag="xlrelease/builder", nocache=True, forcerm=True, use_config_proxy=True)
File "/usr/local/python3.7.3/lib/python3.7/site-packages/docker/models/images.py", line 279, in build
resp = self.client.api.build(**kwargs)
File "/usr/local/python3.7.3/lib/python3.7/site-packages/docker/api/build.py", line 179, in build
buildargs.setdefault(k, v)
AttributeError: 'NoneType' object has no attribute 'setdefault'
I have a new parameter(buildargs) when i call the client function:
image=client.images.build(path=os.getcwd(), buildargs={'tags':'test'}, dockerfile=os.getcwd()+"/Dockerfile", tag="xlrelease/builder", nocache=True, forcerm=True, use_config_proxy=True)
This solved the issue
I'd like to send data defined in a module that was dynamically loaded with imp via a Manager().Queue() on Windows. Is this possible? Here is a minimal testcase to demonstrate what I mean:
import imp
import sys
from multiprocessing import Manager
if __name__ == '__main__':
s = """
def payload():
print("It works!")
"""
mod = imp.new_module('testcase')
exec s in mod.__dict__
sys.modules['testcase'] = mod
payload = mod.payload
payload() # It works!
m = Manager()
queue = m.Queue()
queue.put(payload) # AttributeError: 'module' object has no attribute 'payload'
Note: The use of imp.new_module + exec is just to get the testcase in a single file. The same AttributeError is raised when using imp.load_source.
Note2: This testcase leaves out all the Pool/worker code as the error happens before then.
Here is the output with full traceback from running the above script:
It works!
Traceback (most recent call last):
File "testcase.py", line 23, in <module>
queue.put(payload) # AttributeError: 'module' object has no attribute 'payload'
File "<string>", line 2, in put
File "c:\Users\Andrew\dev\python\lib\multiprocessing\managers.py", line 774, in _callmethod
raise convert_to_error(kind, result)
multiprocessing.managers.RemoteError:
---------------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Users\Andrew\dev\python\lib\multiprocessing\managers.py", line 240, in serve_client
request = recv()
AttributeError: 'module' object has no attribute 'payload'
---------------------------------------------------------------------------
Thanks!