Closed byq-luo closed 4 years ago
EDIT: See next comment. Try that out first.
Hello @byq-luo! What's your LOG_FILES_DIRECTORY
? Since you're on Windows, you might need to change it to something like LOG_FILES_DIRECTORY="C:\Users\Administrator\ivy\data\logs"
. Same goes for all other paths in your .env file.
Please try this out and get back to me.
Cheers!
I just noticed you tried running the program with python main.py
. Use python -m main
instead. That might fix your issue.
I just noticed you tried running the program with
python main.py
. Usepython -m main
instead. That might fix your issue.
Using python -m main it has the same problem.
EDIT: See next comment. Try that out first.
Hello @byq-luo! What's your
LOG_FILES_DIRECTORY
? Since you're on Windows, you might need to change it to something likeLOG_FILES_DIRECTORY="C:\Users\Administrator\ivy\data\logs"
. Same goes for all other paths in your .env file. Please try this out and get back to me.Cheers!
I'm a newbie, I don't understand LOG_FILES_DIRECTORY file, I try it with ubuntu.
EDIT: See next comment. Try that out first. Hello @byq-luo! What's your
LOG_FILES_DIRECTORY
? Since you're on Windows, you might need to change it to something likeLOG_FILES_DIRECTORY="C:\Users\Administrator\ivy\data\logs"
. Same goes for all other paths in your .env file. Please try this out and get back to me. Cheers!I'm a newbie, I don't understand LOG_FILES_DIRECTORY file, I try it with ubuntu.
I tried it(python -m main) with ubuntu and still the same problem. Seek guidance.
LOG_FILES_DIRECTORY
is an environment variable that specifies the folder where you want Ivy log files to be stored.
Did you create a .env file? If you haven't, please do so. See: https://github.com/nicholaskajoh/ivy/blob/master/.env.example.
LOG_FILES_DIRECTORY
is an environment variable that specifies the folder where you want Ivy log files to be stored.Did you create a .env file? If you haven't, please do so. See: https://github.com/nicholaskajoh/ivy/blob/master/.env.example.
I had create a .env file.
(ivy) PS C:\Users\Administrator\ivy> python -m main
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\ivy\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\ProgramData\Anaconda3\envs\ivy\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Administrator\ivy\main.py", line 143, in
VIDEO="C:/Users/Administrator/ivy/data/videos/sample_traffic_scene.mp4"
IS_CAM=False
DROI=[(750, 405), (1094, 398), (1569, 1028), (501, 1028)] USE_DROI=True SHOW_DROI=True # Display/overlay the detection ROI on the video
MCDF=2
MCTF=3
DI=10
DETECTOR="yolo"
ENABLE_GPU_ACCELERATION=False
TRACKER="kcf"
RECORD=False
OUTPUT_VIDEO_PATH="C:/Users/Administrator/ivy/data/videos/output.avi"
HEADLESS=False
COUNTING_LINES=[{'label': 'A', 'line': [(667, 713), (888, 713)]}, {'label': 'B', 'line': [(1054, 866), (1423, 868)]}]
HAAR_CASCADE_PATH="C:/Users/Administrator/ivy/data/detectors/haarcascade/car.xml"
TFODA_WEIGHTS_PATH="C:/Users/Administrator/ivy/data/detectors/tfoda/faster_rcnn_inception_v2_coco_2018_01_28.pb" TFODA_CONFIG_PATH="C:/Users/Administrator/ivy/data/detectors/tfoda/faster_rcnn_inception_v2_coco_2018_01_28.pbtxt" TFODA_CLASSES_PATH="C:/Users/Administrator/ivy/data/detectors/coco_classes.txt" TFODA_CLASSES_OF_INTEREST_PATH="C:/Users/Administrator/ivy/data/detectors/coco_classes_of_interest.txt" TFODA_CONFIDENCE_THRESHOLD=0.2
YOLO_WEIGHTS_PATH="C:/Users/Administrator/ivy/data/detectors/yolo/yolov3.weights" YOLO_CONFIG_PATH="C:/Users/Administrator/ivy/data/detectors/yolo/yolov3.cfg" YOLO_CLASSES_PATH="C:/Users/Administrator/ivy/data/detectors/coco_classes.txt" YOLO_CLASSES_OF_INTEREST_PATH="C:/Users/Administrator/ivy/data/detectors/coco_classes_of_interest.txt" YOLO_DATA_PATH="C:/Users/Administrator/ivy/data/detectors/coco.data" YOLO_CONFIDENCE_THRESHOLD=0.5
ENABLE_CONSOLE_LOGGER=True ENABLE_FILE_LOGGER=True ENABLE_LOGSTASH_LOGGER=False
LOG_FILES_DIRECTORY="C:/Users/Administrator/ivy/data/logs/"
DEBUG_WINDOW_SIZE=(858, 480)
The environment variable LOG_FILES_DIRECTORY
isn't set. That I know for sure. That's why you're getting the error you're getting. But I don't know why it isn't set. If you created a .env file in the root directory of the repo, it should pickup the variables from there. I'll need more information to be able to help you.
To confirm what I'm saying run...
set LOG_FILES_DIRECTORY "C:/Users/Administrator/ivy/data/logs/"
python -m main
You should get a different error from the one you're getting now.
The environment variable
LOG_FILES_DIRECTORY
isn't set. That I know for sure. That's why you're getting the error you're getting. But I don't know why it isn't set. If you created a .env file in the root directory of the repo, it should pickup the variables from there. I'll need more information to be able to help you.To confirm what I'm saying run...
set LOG_FILES_DIRECTORY "C:/Users/Administrator/ivy/data/logs/" python -m main
You should get a different error from the one you're getting now.
(ivy) PS C:\Users\Administrator\ivy> set LOG_FILES_DIRECTORY "C:/Users/Administrator/ivy/data/logs/"
(ivy) PS C:\Users\Administrator\ivy> python -m main
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\ivy\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\ProgramData\Anaconda3\envs\ivy\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Administrator\ivy\main.py", line 143, in
Hmm... this is weird. You know what? I'll get a Windows machine and try setting it up to see if I can reproduce this issue.
I've tested on Mac and Linux, following the instructions in the readme. It works fine as expected. I'll try it out on Windows when I get access to a PC and get back to you.
But I've tested it on Ubuntu, and I'm still have the same errors.发自我的iPhone------------------ Original ------------------From: Nicholas Kajoh notifications@github.comDate: Mon,Jan 13,2020 5:57 PMTo: nicholaskajoh/ivy ivy@noreply.github.comCc: byq-luo luozb@chd.edu.cn, Mention mention@noreply.github.comSubject: Re: [nicholaskajoh/ivy] TypeError: expected str, bytes or os.PathLikeobject, not NoneType (#37)I've tested on Mac and Linux, following the instructions in the readme. It works fine as expected. I'll try it out on Windows when I get access to a PC and get back to you.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/nicholaskajoh/ivy/issues/37?email_source=notifications\u0026email_token=AM6ICUMXZIRYIW6ZQGZDZYTQ5Q3HLA5CNFSM4KEUMWQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIYDKKQ#issuecomment-573584682", "url": "https://github.com/nicholaskajoh/ivy/issues/37?email_source=notifications\u0026email_token=AM6ICUMXZIRYIW6ZQGZDZYTQ5Q3HLA5CNFSM4KEUMWQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIYDKKQ#issuecomment-573584682", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
I believe you're missing an important step in the setup process. I've followed the instructions in the readme squarely and I was able to create a fresh setup without any problems. If you want me to put you through, send me an email and we can schedule a call.
I'm closing this issue for now because this is not a bug. Although I admit error handling could use some help and I'll be working on making errors as descriptive as possible.
Cheers!
I had sent my document to your gmai email yesterday. I don't know if you received it. My email is luozhongbin2015@gmail.com.发自我的iPhone------------------ Original ------------------From: Nicholas Kajoh notifications@github.comDate: Tue,Jan 14,2020 2:40 PMTo: nicholaskajoh/ivy ivy@noreply.github.comCc: byq-luo luozb@chd.edu.cn, Mention mention@noreply.github.comSubject: Re: [nicholaskajoh/ivy] TypeError: expected str, bytes or os.PathLikeobject, not NoneType (#37)Closed #37.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/nicholaskajoh/ivy/issues/37?email_source=notifications\u0026email_token=AM6ICUNVVHGSGL2VPSHYFV3Q5VM4DA5CNFSM4KEUMWQKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOV6LBG4Y#event-2945848179", "url": "https://github.com/nicholaskajoh/ivy/issues/37?email_source=notifications\u0026email_token=AM6ICUNVVHGSGL2VPSHYFV3Q5VM4DA5CNFSM4KEUMWQKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOV6LBG4Y#event-2945848179", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
TypeError: expected str, bytes or os.PathLike object, not NoneType
(ivy) PS C:\Users\Administrator\ivy> python main.py Traceback (most recent call last): File "main.py", line 143, in
init_logger()
File "C:\Users\Administrator\ivy\util\logger.py", line 55, in init_logger
pathlib.Path(log_files_directory).mkdir(parents=True, exist_ok=True)
File "D:\ProgramData\Anaconda3\envs\ivy\lib\pathlib.py", line 983, in new
self = cls._from_parts(args, init=False)
File "D:\ProgramData\Anaconda3\envs\ivy\lib\pathlib.py", line 640, in _from_parts
drv, root, parts = self._parse_args(args)
File "D:\ProgramData\Anaconda3\envs\ivy\lib\pathlib.py", line 624, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType