Skip to content

Conversation

@seemab-yamin
Copy link
Contributor

Calling urlretrieve after from fastcore.net import * fails inside the function with

NameError: name 'tempfile' is not defined

Root cause: tempfile is used but not imported in the module.

Changes:

  • Added import tempfile to the top imports cell in nbs/03b_net.ipynb
  • Ran nbdev-export → clean diff in fastcore/net.py
  • Verified with local repro: download now succeeds without error

Tested with nbdev-test (passed).

@seemab-yamin seemab-yamin force-pushed the fix-net-urlretrieve-tempfile-import branch from 48505bb to efd37bf Compare February 2, 2026 09:41
@seemab-yamin
Copy link
Contributor Author

@jph00 - Implemented the style fix. Thanks for your time.

@jph00
Copy link
Contributor

jph00 commented Feb 2, 2026

Good job!

@jph00 jph00 merged commit 3629a8d into AnswerDotAI:main Feb 2, 2026
@seemab-yamin seemab-yamin deleted the fix-net-urlretrieve-tempfile-import branch February 3, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants