Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'TryExcept' from 'utils' (C:\Users\User\XXX\utils\__init__.py) #11721

Closed
stphtan94117 opened this issue Jun 17, 2023 · 2 comments
Labels

Comments

@stphtan94117
Copy link

Hi
I jsut download new yolov5-7.0 version today and pip install -r requirements.txt
when i python segment/predict.py --weights weights/crack.pt --img 1280, got this error.

but i python detect.py --weights weights/yolov5s --img 1280, it is ok.

what happened

@glenn-jocher
Copy link
Member

@stphtan94117 hi,

Thank you for reaching out and providing details about the error you encountered.

It looks like you are facing an ImportError when trying to import the 'TryExcept' module from the 'utils' package in the yolov5-7.0 version. This error is most likely due to a missing or incompatible package or module in your environment.

To troubleshoot this issue, I recommend checking the following steps:

  1. Ensure that you have correctly installed all the required packages mentioned in the 'requirements.txt' file. Please note that some packages may require specific versions or dependencies.

  2. Verify that the 'utils' package is present in the correct location within the yolov5-7.0 directory. Double-check if the necessary files and folders are intact.

  3. It is also possible that there might be conflicting versions of packages installed in your Python environment. You can try creating a new virtual environment and installing the required packages there to isolate any potential conflicts.

If the issue still persists, please provide more information about your environment, including the versions of Python, PyTorch, and any other relevant packages you are using. Additionally, please specify how you downloaded the yolov5-7.0 version, as it will help us understand if there might have been any issues during the download process.

Remember, I'm here to assist you, but please note that the YOLOv5 repository is maintained by the Ultralytics team and the YOLO community, so any praise or acknowledgments should be directed towards them.

Best regards,
Glenn Jocher

@github-actions
Copy link
Contributor

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

@github-actions github-actions bot added the Stale label Jul 18, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants