Import problems on Beanstalk
See original GitHub issueHi all, Has anyone tried using this great library on AWS Elastic Beanstalk Python 3.4. I’m getting a strange error, despite images.py existing in the newspaper directory.
Traceback (most recent call last):
File "/opt/python/current/app/application.py", line 12, in <module>
from server.helper import get_connection, requires_auth, validate_schema, error_handler
File "/opt/python/current/app/server/helper.py", line 13, in <module>
from database.user import User
File "/opt/python/current/app/database/user.py", line 11, in <module>
from .post import Post
File "/opt/python/current/app/database/post.py", line 9, in <module>
from newspaper import Article
File "/opt/python/run/venv/lib/python3.4/site-packages/newspaper/__init__.py", line 10,in <module>
from .api import (build, build_article, fulltext, hot, languages,
File "/opt/python/run/venv/lib/python3.4/site-packages/newspaper/api.py", line 14, in <module>
from .article import Article
File "/opt/python/run/venv/lib/python3.4/site-packages/newspaper/article.py", line 14, in <module>
from . import images
ImportError: cannot import name 'images'
I have installed all dependencies (Pillow, lxml, libjpeg etc.) correctly and surprisingly when I ssh to instance it works properly.
Any help would be appreciated, thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
AWS Elastic Beanstalk - Unable to import local file
I've been trying to deploy a Python (Flask framework) backend via Elastic Beanstalk. Here's my error ...
Read more >AWS Elastic Beanstalk settings issue when importing ... - GitHub
I'm trying import Elastic beanstalk existing environment. I added basic settings in the configuration file to check why it isn't working.
Read more >Resolve the error when Amazon EC2 instances fail to ...
When I try to create an AWS Elastic Beanstalk environment, I get the following error: "The EC2 instances failed to communicate with AWS...
Read more >Error running on aws / beanstalk - usage - Prodigy Support
Hi. I am troubleshooting an issue I'm running into in attempting to import prodigy from a django app view on an ec2 instance...
Read more >AWS Elastic beanstalk python install error in latest Amazon ...
AWS Elastic beanstalk python install error in latest Amazon Linux 2/3.3.12 ... line 9, in <module> from setuptools import convert_path, find_packages, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Very cool, nicely done getting it to work @jebudas! I not familiar with .ebextensions or beanstalk installation process. Weird that you needed to run chmod yourself too.
Hmm do you think you can help in adding an installation section for AWS Elastic Beanstalk so other beanstalk users can avoid the same problems you ran into? 👍 🙇
Got it working! I had to add these to certain .ebextensions files:
packages: yum: libjpeg-turbo-devel: [] libxslt-devel: [] libxml2-devel: []
04_setup_newspaper: command: mkdir -p /home/wsgi/.newspaper_scraper/memoized && chmod 755 /home/wsgi/.newspaper_scraper/memoized