-
Notifications
You must be signed in to change notification settings - Fork 32
[WIP] Victor Mikhan #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
viktarmikhan
wants to merge
26
commits into
introduction-to-python-bsuir-2019:master
Choose a base branch
from
viktarmikhan:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[WIP] Victor Mikhan #55
viktarmikhan
wants to merge
26
commits into
introduction-to-python-bsuir-2019:master
from
viktarmikhan:master
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…p.py with conf data
import setuptools | ||
import conf | ||
|
||
setuptools.setup( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не получается установить пакет
# pip install .
Processing /PythonHomework
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-v64yw744/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-v64yw744/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-v64yw744/pip-egg-info
cwd: /tmp/pip-req-build-v64yw744/
Complete output (8 lines):
running egg_info
creating /tmp/pip-req-build-v64yw744/pip-egg-info/rss_reader.egg-info
writing /tmp/pip-req-build-v64yw744/pip-egg-info/rss_reader.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-req-build-v64yw744/pip-egg-info/rss_reader.egg-info/dependency_links.txt
writing entry points to /tmp/pip-req-build-v64yw744/pip-egg-info/rss_reader.egg-info/entry_points.txt
writing top-level names to /tmp/pip-req-build-v64yw744/pip-egg-info/rss_reader.egg-info/top_level.txt
writing manifest file '/tmp/pip-req-build-v64yw744/pip-egg-info/rss_reader.egg-info/SOURCES.txt'
error: package directory 'rss_reader' does not exist
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
…cache yet. add loggers to cache files
… fully work with date option and loading specified cache data
…in verbose and feeds
…e and cache mechanism. fix html template in converter
…--to-pdf parametr. create default onverter templates
К сожалению, у меня не получилось запустить :( # rss-reader --help
Traceback (most recent call last):
File "/usr/local/bin/rss-reader", line 5, in <module>
from __main__ import main
ImportError: cannot import name 'main' from '__main__' (/usr/local/bin/rss-reader) |
Есть проблема с зависимостями # rss-reader --help
Traceback (most recent call last):
File "/usr/local/bin/rss-reader", line 5, in <module>
from src.rss_reader import main
File "/usr/local/lib/python3.8/site-packages/src/rss_reader.py", line 5, in <module>
from .components.feed import *
File "/usr/local/lib/python3.8/site-packages/src/components/feed/__init__.py", line 1, in <module>
from .feed import Feed
File "/usr/local/lib/python3.8/site-packages/src/components/feed/feed.py", line 9, in <module>
from src.components.logger.logger import Logger
File "/usr/local/lib/python3.8/site-packages/src/components/logger/__init__.py", line 1, in <module>
from .logger import Logger
File "/usr/local/lib/python3.8/site-packages/src/components/logger/logger.py", line 5, in <module>
import yaml
ModuleNotFoundError: No module named 'yaml' |
|
конвертация в PDF # rss-reader https://news.tut.by/rss/index.rss --to-pdf /data/my_news.pdf
Traceback (most recent call last):
File "/usr/local/bin/rss-reader", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/src/rss_reader.py", line 48, in main
App.start()
File "/usr/local/lib/python3.8/site-packages/src/rss_reader.py", line 40, in start
return cls()._feed.show_feeds()
File "/usr/local/lib/python3.8/site-packages/src/rss_reader.py", line 36, in __init__
PdfConverter(self._console_args.to_pdf, self._console_args.limit).render(self._feed)
File "/usr/local/lib/python3.8/site-packages/src/components/converter/html/html_converter.py", line 41, in render
self._entry_render(entry)
File "/usr/local/lib/python3.8/site-packages/src/components/converter/html/html_converter.py", line 87, in _entry_render
return self._template_processor.get_template('entry.html.jinja2').render(
File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 830, in get_template
return self._load_template(name, self.make_globals(globals))
File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 804, in _load_template
template = self.loader.load(self, name, globals)
File "/usr/local/lib/python3.8/site-packages/jinja2/loaders.py", line 113, in load
source, filename, uptodate = self.get_source(environment, name)
File "/usr/local/lib/python3.8/site-packages/jinja2/loaders.py", line 187, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: entry.html.jinja2 |
К сожалению, такая же ситуация с HTML |
Кэш при отключенном интернете не работает # rss-reader https://news.tut.by/rss/index.rss --date 20191208
Traceback (most recent call last):
File "/usr/local/lib/python3.8/urllib/request.py", line 1317, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/local/lib/python3.8/http/client.py", line 1230, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1276, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1225, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1004, in _send_output
self.send(msg)
File "/usr/local/lib/python3.8/http/client.py", line 944, in send
self.connect()
File "/usr/local/lib/python3.8/http/client.py", line 1392, in connect
super().connect()
File "/usr/local/lib/python3.8/http/client.py", line 915, in connect
self.sock = self._create_connection(
File "/usr/local/lib/python3.8/socket.py", line 787, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/local/lib/python3.8/socket.py", line 914, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/src/components/parser/arguments/positional/source.py", line 30, in _validate_source
if url.urlopen(source).getcode() is not 200:
File "/usr/local/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/local/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.8/urllib/request.py", line 1360, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/local/lib/python3.8/urllib/request.py", line 1320, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/rss-reader", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/src/rss_reader.py", line 48, in main
App.start()
File "/usr/local/lib/python3.8/site-packages/src/rss_reader.py", line 40, in start
return cls()._feed.show_feeds()
File "/usr/local/lib/python3.8/site-packages/src/rss_reader.py", line 25, in __init__
self._console_args = console.get_args()
File "/usr/local/lib/python3.8/site-packages/src/components/parser/parser.py", line 41, in get_args
return self._parser.parse_args()
File "/usr/local/lib/python3.8/argparse.py", line 1768, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/local/lib/python3.8/argparse.py", line 1800, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/local/lib/python3.8/argparse.py", line 1988, in _parse_known_args
positionals_end_index = consume_positionals(start_index)
File "/usr/local/lib/python3.8/argparse.py", line 1965, in consume_positionals
take_action(action, args)
File "/usr/local/lib/python3.8/argparse.py", line 1858, in take_action
argument_values = self._get_values(action, argument_strings)
File "/usr/local/lib/python3.8/argparse.py", line 2388, in _get_values
value = self._get_value(action, arg_string)
File "/usr/local/lib/python3.8/argparse.py", line 2421, in _get_value
result = type_func(arg_string)
File "/usr/local/lib/python3.8/site-packages/src/components/parser/arguments/positional/source.py", line 39, in _validate_source
raise url.URLError(f'Something wrong with your source. Please try another rss feed: {e}')
urllib.error.URLError: <urlopen error Something wrong with your source. Please try another rss feed: <urlopen error [Errno -3] Temporary failure in name resolution>> |
…installing module. add package_data in setup.py to preserve non-py files in module
…eadable json encoding from cyrilic source
Здравсвуйте, Алексей!
Я внес коммиты для устранения отмеченных ошибок.
Спасибо!
…On Sun, Dec 8, 2019 at 2:16 PM Aliaksei Buziuma ***@***.***> wrote:
Кэш при отключенном интернете не работает
# rss-reader https://news.tut.by/rss/index.rss --date 20191208
Traceback (most recent call last):
File "/usr/local/lib/python3.8/urllib/request.py", line 1317, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/local/lib/python3.8/http/client.py", line 1230, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1276, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1225, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1004, in _send_output
self.send(msg)
File "/usr/local/lib/python3.8/http/client.py", line 944, in send
self.connect()
File "/usr/local/lib/python3.8/http/client.py", line 1392, in connect
super().connect()
File "/usr/local/lib/python3.8/http/client.py", line 915, in connect
self.sock = self._create_connection(
File "/usr/local/lib/python3.8/socket.py", line 787, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/local/lib/python3.8/socket.py", line 914, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/src/components/parser/arguments/positional/source.py", line 30, in _validate_source
if url.urlopen(source).getcode() is not 200:
File "/usr/local/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/local/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.8/urllib/request.py", line 1360, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/local/lib/python3.8/urllib/request.py", line 1320, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/rss-reader", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/src/rss_reader.py", line 48, in main
App.start()
File "/usr/local/lib/python3.8/site-packages/src/rss_reader.py", line 40, in start
return cls()._feed.show_feeds()
File "/usr/local/lib/python3.8/site-packages/src/rss_reader.py", line 25, in __init__
self._console_args = console.get_args()
File "/usr/local/lib/python3.8/site-packages/src/components/parser/parser.py", line 41, in get_args
return self._parser.parse_args()
File "/usr/local/lib/python3.8/argparse.py", line 1768, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/local/lib/python3.8/argparse.py", line 1800, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/local/lib/python3.8/argparse.py", line 1988, in _parse_known_args
positionals_end_index = consume_positionals(start_index)
File "/usr/local/lib/python3.8/argparse.py", line 1965, in consume_positionals
take_action(action, args)
File "/usr/local/lib/python3.8/argparse.py", line 1858, in take_action
argument_values = self._get_values(action, argument_strings)
File "/usr/local/lib/python3.8/argparse.py", line 2388, in _get_values
value = self._get_value(action, arg_string)
File "/usr/local/lib/python3.8/argparse.py", line 2421, in _get_value
result = type_func(arg_string)
File "/usr/local/lib/python3.8/site-packages/src/components/parser/arguments/positional/source.py", line 39, in _validate_source
raise url.URLError(f'Something wrong with your source. Please try another rss feed: {e}')
urllib.error.URLError: <urlopen error Something wrong with your source. Please try another rss feed: <urlopen error [Errno -3] Temporary failure in name resolution>>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#55?email_source=notifications&email_token=AK3VXX6L3F3Y37HA56BT7U3QXTJPDA5CNFSM4JOLXJH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGG3UGY#issuecomment-562936347>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK3VXX2FRBOUTRMCMSCGLMTQXTJPDANCNFSM4JOLXJHQ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
MissedPRDeadline
Pull request has been opened after hard deadline.
[1-2 iteration] Minimal requirements checked
[3-4 iteration] Minimal requirements checked
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.