mlsmithjr / transcoder

Python wrapper for ffmpeg for batch and/or concurrent transcoding
GNU General Public License v3.0
117 stars 27 forks source link

I am getting Traceback (most recent call last) issue #9

Closed javeedrahman closed 4 years ago

javeedrahman commented 4 years ago

Hi, I have followed the installaion guide and installed all the required dependecies. While running the command --> pytranscoder --dry-run sample.mkv

I am just testing with 35mb file without changing any config in trancode.yml.

I am getting following error

Traceback (most recent call last):
  File "/home/procserverjh/tmp/pytranscoder/bin/pytranscoder", line 8, in <module>
    sys.exit(main())
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/pytranscoder/transcode.py", line 341, in main
    start()
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/pytranscoder/transcode.py", line 417, in start
    configfile = ConfigFile(DEFAULT_CONFIG)
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/pytranscoder/config.py", line 32, in __init__
    yml = yaml.load(f, Loader=yaml.Loader)
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
    return loader.get_single_data()
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/constructor.py", line 41, in get_single_data
    node = self.get_single_node()
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 82, in compose_node
    node = self.compose_sequence_node(anchor)
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 110, in compose_sequence_node
    while not self.check_event(SequenceEndEvent):
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/parser.py", line 393, in parse_block_sequence_entry
    "expected <block end>, but found %r" % token.id, token.start_mark)
yaml.parser.ParserError: while parsing a block collection
  in "/home/procserverjh/.transcode.yml", line 42, column 9
expected <block end>, but found '<scalar>'
  in "/home/procserverjh/.transcode.yml", line 49, column 19
mlsmithjr commented 4 years ago

Could you include the transcode.yml you are using? I know you said it was the unmodified sample included with the code but the line and column indicated in the error doesn't correspond to what I have in the current sample. Thanks.

On Wed, Dec 18, 2019 at 6:02 AM Javeed rahman notifications@github.com wrote:

Hi, I have followed the installaion guide and installed all the required dependecies. While running the command --> pytranscoder --dry-run sample.mkv

I am just testing with 35mb file without changing any config in trancode.yml.

I am getting following error

Traceback (most recent call last): File "/home/procserverjh/tmp/pytranscoder/bin/pytranscoder", line 8, in sys.exit(main()) File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/pytranscoder/transcode.py", line 341, in main start() File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/pytranscoder/transcode.py", line 417, in start configfile = ConfigFile(DEFAULT_CONFIG) File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/pytranscoder/config.py", line 32, in init yml = yaml.load(f, Loader=yaml.Loader) File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/init.py", line 114, in load return loader.get_single_data() File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/constructor.py", line 41, in get_single_data node = self.get_single_node() File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 36, in get_single_node document = self.compose_document() File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 55, in compose_document node = self.compose_node(None, None) File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 82, in compose_node node = self.compose_sequence_node(anchor) File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/composer.py", line 110, in compose_sequence_node while not self.check_event(SequenceEndEvent): File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/parser.py", line 98, in check_event self.current_event = self.state() File "/home/procserverjh/tmp/pytranscoder/lib/python3.7/site-packages/yaml/parser.py", line 393, in parse_block_sequence_entry "expected , but found %r" % token.id, token.start_mark) yaml.parser.ParserError: while parsing a block collection in "/home/procserverjh/.transcode.yml", line 42, column 9 expected , but found '' in "/home/procserverjh/.transcode.yml", line 49, column 19

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mlsmithjr/transcoder/issues/9?email_source=notifications&email_token=AAHRMTHJ4X6Z2Z57HVRPGVLQZH7MXA5CNFSM4J4JGVA2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IBJZUSA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHRMTBCKIVRJZYUDMKX4ODQZH7MXANCNFSM4J4JGVAQ .

javeedrahman commented 4 years ago

Hi, Thank you for the reply. I have included the transcode.yml which i have copied from simple.yml. I am using Python 3.7, installed PlexAPI. Should i need to install any other dependencies. I have also tried in virutalenv but same error. Here is the command pytranscoder -y transcode.yml --dry-run sample.mkv Thanks.

Here is the pytranscoder code:

#!/usr/bin/python3

# -*- coding: utf-8 -*-
import re
import sys

from pytranscoder.transcode import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(main())
mlsmithjr commented 4 years ago

Did you attach the yml file? It's not part of the email, or maybe github stripped it out. Alternately you can use pastebin.com and send me the link.

On Wed, Dec 18, 2019 at 12:01 PM Javeed rahman notifications@github.com wrote:

Hi, Thank you for the reply. I have included the transcode.yml which i have copied from simple.yml. I am using Python 3.7, installed PlexAPI. Should i need to install any other dependencies. I have also tried in virutalenv but same error. Here is the command pytranscoder -y transcode.yml --dry-run sample.mkv Thanks.

Here is the pytranscoder code:

!/usr/bin/python3

-- coding: utf-8 --

import re import sys

from pytranscoder.transcode import main

if name == 'main': sys.argv[0] = re.sub(r'(-script.pyw?|.exe)?$', '', sys.argv[0]) sys.exit(main())

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mlsmithjr/transcoder/issues/9?email_source=notifications&email_token=AAHRMTGQKU7OPQRWBR2QCX3QZJJPBA5CNFSM4J4JGVA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHGZNEI#issuecomment-567121553, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHRMTDKUOEZN5SIQYBJ453QZJJPBANCNFSM4J4JGVAQ .

JasonPyMe commented 4 years ago

Hello, I am not sure if the other person having this issue uploaded the YAML file but, I am having the same issue. I am running the following, should be the latest versions.

Python 3.8.2 Pytranscoder 2.0.14 Ubuntu Desktop 20.04 Nvidia RTX 4000 GPU - 440 drivers transcode.yml.txt

I have uploaded my YAML file which is pretty much the same as the simple.yml with just a change to the default directory and a ffmpeg setting change.

mlsmithjr commented 4 years ago

Oops, there is a pair of mismatched quotes on line 48. Just swap the single quote for a double or vise-versa.

JasonPyMe commented 4 years ago

That worked thank you for the quick response.