rajatomar788 / pywebcopy

Locally saves webpages to your hard disk with images, css, js & links as is.
https://rajatomar788.github.io/pywebcopy/
Other
527 stars 106 forks source link

ModuleNotFound error #34

Closed kaavik closed 4 years ago

kaavik commented 4 years ago

Hello,

I am successfully using pywebcopy with Python 3.7 on Mac. However, when I run the same code in Python 3.5 running in Linux with exact same modules installed via virtualenv, it fails with error shown below, even though exact same modules are installed. PyWebCopy error message does not indicate what module is missing and since same modules are installed in both Mac and Linux, this seems like it may be a bug?

(venv35) [root@eye ~/cpt/chirp]# python chirp.py example.cidr
Traceback (most recent call last):
  File "chirp.py", line 27, in <module>
    import pywebcopy
  File "/root/cpt/chirp/venv35/lib/python3.5/site-packages/pywebcopy/__init__.py", line 49, in <module>
    from .configs import config, SESSION
  File "/root/cpt/chirp/venv35/lib/python3.5/site-packages/pywebcopy/configs.py", line 18, in <module>
    from .exceptions import AccessError
  File "/root/cpt/chirp/venv35/lib/python3.5/site-packages/pywebcopy/exceptions.py", line 30, in <module>
    class DependencyNotFoundError(ModuleNotFoundError):
NameError: name 'ModuleNotFoundError' is not defined
(venv35) [root@eye ~/cpt/chirp]#

List of packages from Mac with Python 3.7 (working):

(venv37) MBP-16:chirp$ pip list
Package           Version   
----------------- ----------
astroid           2.3.3     
beautifulsoup4    4.8.2     
certifi           2019.11.28
chardet           3.0.4     
cssselect         1.1.0     
dnspython         1.16.0    
fire              0.2.1     
future            0.18.2    
idna              2.9       
isort             4.3.21    
lazy-object-proxy 1.4.3     
lxml              4.5.0     
mccabe            0.6.1     
parse             1.15.0    
pip               20.0.2    
pylint            2.4.4     
pyquery           1.4.1     
python-whois      0.7.2     
pywebcopy         6.1.1     
requests          2.23.0    
setuptools        40.8.0    
six               1.14.0    
soupsieve         2.0       
termcolor         1.1.0     
typed-ast         1.4.1     
urllib3           1.25.8    
w3lib             1.21.0    
wrapt             1.11.2    
(venv37) MBP-16:chirp$ 

List of packages from Linux with Python 3.5 (not working):

(venv35) [root@eye ~/chirp]# pip list
Package           Version
----------------- ----------
astroid           2.3.3
beautifulsoup4    4.8.2
certifi           2019.11.28
chardet           3.0.4
cssselect         1.1.0
dnspython         1.16.0
fire              0.2.1
future            0.18.2
idna              2.9
isort             4.3.21
lazy-object-proxy 1.4.3
lxml              4.5.0
mccabe            0.6.1
parse             1.15.0
pip               20.0.2
pylint            2.4.4
pyquery           1.4.1
python-whois      0.7.2
pywebcopy         6.1.1
requests          2.23.0
setuptools        18.2
six               1.14.0
soupsieve         2.0
termcolor         1.1.0
typed-ast         1.4.1
urllib3           1.25.8
w3lib             1.21.0
wrapt             1.11.2
(venv35) [root@eye ~/chirp]#
rajatomar788 commented 4 years ago

The ModuleNotFoundError is python builtin and could defer availability on different platforms. It is definitely not available in below python 3.6. I would remove it in next update.

rajatomar788 commented 4 years ago

Fix should remove this issue otherwise reopen it.