Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to import module in Python

Why am I having an 'undefined bdir module' error, here is my directory,

a.py

bdir->bdir>module.py

in a.py

   from bdir import *  
like image 504
weather api Avatar asked May 26 '26 04:05

weather api


1 Answers

Put an __init__.py file (even empty) in your bdir folder.

like image 163
VdF Avatar answered May 28 '26 18:05

VdF



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!