# CBCTToothSegmentation: How to fix "torch.load with weights\_only=False"

**URL:** <https://discourse.slicer.org/t/cbcttoothsegmentation-how-to-fix-torch-load-with-weights-only-false/38398>\
**Category:** Support\
**Tags:** segmentation, python, dental\
**Created:** [September 16, 2024, 11:42am UTC](https://discourse.slicer.org/t/cbcttoothsegmentation-how-to-fix-torch-load-with-weights-only-false/38398 "2024-09-16T11:42:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bay\_6](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bay_6/32/77945_2.png) [@Bay\_6](https://discourse.slicer.org/u/Bay_6)\
**Post date:** [September 16, 2024, 11:42am UTC](https://discourse.slicer.org/t/cbcttoothsegmentation-how-to-fix-torch-load-with-weights-only-false/38398/1 "2024-09-16T11:42:00Z")

</div>

When I work with the extension #extensions-manager CBCTToothSegmentation, the below error occur. Which file do I need to fix and how to do with it. It seems to be a python problem and I searched some solution but it did not work.

Slicer version：Slicer 5.7.0-2024-09-05

> You are using torch.load with weights\_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See [pytorch/SECURITY.md at main · pytorch/pytorch · GitHub](https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models) for more details). In a future release, the default value for weights\_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add\_safe\_globals. We recommend you start setting weights\_only=True for any use case where you don’t have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 16, 2024, 11:45am UTC](https://discourse.slicer.org/t/cbcttoothsegmentation-how-to-fix-torch-load-with-weights-only-false/38398/2 "2024-09-16T11:45:46Z")

</div>

This does not sound like an error (just a warning that some unsecure feature will be disabled in the future).

You can reach developers in the [repository’s issue tracker](https://github.com/KitwareMedical/SlicerCBCTToothSegmentation/issues). You will need to provide information about what did you do exactly, on what operating system, using what hardware (CPU, GPU, RAM, …), on what data, how did you get this error message, and post not just a selected message but the full log.
