imgur-album-downloader | Pure client-side webapp | Download Utils library
kandi X-RAY | imgur-album-downloader Summary
kandi X-RAY | imgur-album-downloader Summary
A Pure JS webapp to download entire or parts of Imgur albums.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of imgur-album-downloader
imgur-album-downloader Key Features
imgur-album-downloader Examples and Code Snippets
Community Discussions
Trending Discussions on imgur-album-downloader
QUESTION
I'm trying to import a class from a different file but it keeps giving me a "ModuleNotFoundError: No module named 'x'" error.
I'm trying to make myself a little Telegram bot that can do a variety of things for me. I am using PyCharm on Windows to code. Everything works on Windows. But after I copied the code to my VPS it spits out "ModuleNotFoundError". I have tried to use relative imports as well as absolute imports but none of them seemed to work. Read about relative and absolute imports from here.
When using relative imports, I get a different error saying " __main __.fileName " is not a package, which I feel is a step backwards.
I also think that I am having the same issue as the person on this stackexchange post. I did what the answer there said and added an empty "init.py" file, but I had no changes in output. Then I saw that, correct me if I am wrong, Python 3.3 and after does not need an empty init.py file in each of the subdirectories. But I still have them. Just in case.
I've already gone through a bunch of stackoverflow questions on kind of the same issue. But none of the answers are really solutions to my issue in my opinion.
Here is my directory structure right now.
...ANSWER
Answered 2019-May-08 at 19:08You're probably not accessing main.py
from the same folder. Check your working directory. What edition of PyCharm are you using? Can you run it from the terminal? Also, did you try removing the directory prefix so it's just from downloader import ImgurAlbumDownloader
?
My final tip would be to follow a conventional project structure where your tests are in a different folder: What is the best project structure for a Python application?
QUESTION
I am trying to create a Python package. You can have a look at my awful attempt here.
I have a module called imguralbum.py
. It lives in a directory called ImgurAlbumDownloader
which I understand is the name of the package -- in terms of what you type in an import
statement, e.g.
ANSWER
Answered 2018-Jul-22 at 06:18I still have to figure out why (I have some ideas), but this is now working:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install imgur-album-downloader
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page