Python Forum
ModuleNotFoundError: No module named '__main__.vtt'; '__main__' is not a package
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ModuleNotFoundError: No module named '__main__.vtt'; '__main__' is not a package
#11
Then write the full path to myvideogrep.py instead of myvideogrep.py
Reply
#12
Photo 
I saved this in C:\Python37,
C:\Users\YL>python myvideogrep.py -i "C:\A" --search 'Not you' -o "C:\test.mp4"
(null): can't open file 'myvideogrep.py': [Errno 2] No such file or directory
[Image: yJta2u3.jpg]
Reply
#13
Then use full path python C:\Python37\myvideogrep.py -i "C:\A" --search 'Not you' -o "C:\test.mp4"
Reply
#14
(Sep-05-2018, 06:02 PM)Gribouillis Wrote: Then use full path python C:\Python37\myvideogrep.py -i "C:\A" --search 'Not you' -o "C:\test.mp4"
Finally works for this, but I have tried.
C:\Users\YL>python C:\Python37\myvideogrep.py -i "C:\A" --search 'Not you' -o "C:\test.mp4"
usage: myvideogrep.py [-h] --input [INPUTFILE [INPUTFILE ...]]
                      [--search SEARCH]
                      [--search-type {re,pos,hyper,fragment,franken,word}]
                      [--use-transcript] [--use-vtt] [--max-clips MAXCLIPS]
                      [--output OUTPUTFILE] [--export-clips] [--demo]
                      [--randomize] [--youtube YOUTUBE] [--padding PADDING]
                      [--resyncsubs SYNC] [--transcribe] [--ngrams NGRAMS]
myvideogrep.py: error: unrecognized arguments: you'
So I used different file to test out but new problem just arouse, I am getting same error like this.
https://github.com/antiboredom/videogrep/issues/48
C:\Users\YL>python C:\Python37\myvideogrep.py -i "G:\I" -s 'All' -st word -o test.mp4
[!] No subtitle files were found.
Traceback (most recent call last):
  File "C:\Python37\myvideogrep.py", line 3, in <module>
    videogrep.main()
  File "C:\Python37\lib\site-packages\videogrep\videogrep.py", line 528, in main
    videogrep(args.inputfile, args.outputfile, args.search, args.searchtype, args.maxclips, args.padding, args.demo, args.randomize, args.sync, args.use_transcript, args.use_vtt, args.export_clips)
  File "C:\Python37\lib\site-packages\videogrep\videogrep.py", line 456, in videogrep
    composition = compose_from_srts(srts, search, searchtype)
  File "C:\Python37\lib\site-packages\videogrep\videogrep.py", line 317, in compose_from_srts
    for srt in srts:
TypeError: 'bool' object is not iterable
I don't know how Albertkaruna solved this issue as he closed that issue.
Now I need to learn more about it.
Reply
#15
I use Windows command line once in a great while but perhaps "Not you" would work better than 'Not you'. The command line is not Python.
Reply
#16
C:\Python37>python C:\Python37\myvideogrep.py -i "C:\A" --search "Not you" -o "C:\test.mp4"python C:\Python37\myvideogrep.py -i "C:\A" --search "Not you" -o "C:\test.mp4"
usage: myvideogrep.py [-h] --input [INPUTFILE [INPUTFILE ...]]
                      [--search SEARCH]
                      [--search-type {re,pos,hyper,fragment,franken,word}]
                      [--use-transcript] [--use-vtt] [--max-clips MAXCLIPS]
                      [--output OUTPUTFILE] [--export-clips] [--demo]
                      [--randomize] [--youtube YOUTUBE] [--padding PADDING]
                      [--resyncsubs SYNC] [--transcribe] [--ngrams NGRAMS]
myvideogrep.py: error: unrecognized arguments: C:\Python37\myvideogrep.py

C:\Python37>python C:\Python37\myvideogrep.py -i "G:\I" -s "All" -st word -o test.mp4
[!] No subtitle files were found.
Traceback (most recent call last):
  File "C:\Python37\myvideogrep.py", line 3, in <module>
    videogrep.main()
  File "C:\Python37\lib\site-packages\videogrep\videogrep.py", line 528, in main
    videogrep(args.inputfile, args.outputfile, args.search, args.searchtype, args.maxclips, args.padding, args.demo, args.randomize, args.sync, args.use_transcript, args.use_vtt, args.export_clips)
  File "C:\Python37\lib\site-packages\videogrep\videogrep.py", line 456, in videogrep
    composition = compose_from_srts(srts, search, searchtype)
  File "C:\Python37\lib\site-packages\videogrep\videogrep.py", line 317, in compose_from_srts
    for srt in srts:
TypeError: 'bool' object is not iterable
Really annoying and mysterious!
Reply
#17
(Sep-06-2018, 12:06 AM)MM2018 Wrote: Really annoying and mysterious!
Nothing mysterious, it is a bug. You can send a bug report, use another program or fork the program and develop it by your own means.
Reply
#18
Quote:You can send a bug report,
Ok, I sent it.
Quote:use another program

There is no alternative program like Videogrep currently. Some programs are outdated, so I don't test them.
Quote:or fork the program and develop it by your own means.
Just started learning Python, don't know how long to fork/develop this!
This is why I posted here to fix this issue by someone as original author muted my issues.
or maybe I tried linux one more time.
Reply
#19
I have tested High Sierra MacOSX on Virtualbox, and downloaded apps, and not run via Terminal, works flawlessly.
But same file was not works on Windows10/Ubuntu linux with 64bit python 3.7.
Any expert fix this, really weird problem on other os!
Reply
#20
(Sep-11-2018, 11:08 AM)MM2018 Wrote: Any expert fix this, really weird problem on other os!
The problem is that author has never tested it or make an effort to make it work on Windows.
In setup.py there is:
setup(name='videogrep',
      ...     
      scripts = ['bin/videogrep'],
This will not make a executable command line .exe for Windows.
It could have been done with entry_points in setup.py.
This will make executable for all OS,also it will make a .exe videogrep.exe in folder Python../Scripts for Windows.
Eg:
setup(
    ...
    entry_points = {
        'console_scripts': [
            'foo = package.module:videogrep',
        ],
    }
)
Click author Armin explain it here.

If i have time i can maybe look into into source code,
and see if it possibly to use entry_points,so videogrep will make a videogrep.exe for Windows.
You can make and Issues on Repo about this,the problem can be that author is no longer active or will not test for Windows.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  no module named 'docx' when importing docx MaartenRo 1 889 Dec-31-2023, 11:21 AM
Last Post: deanhystad
  Problem with pymodbus - ModuleNotFoundError: No module named 'pymodbus.client.sync' stsxbel 2 23,790 Nov-02-2023, 08:20 AM
Last Post: South_east
  ModuleNotFoundError: No module named 'requests' Serg 18 2,594 Oct-29-2023, 11:33 PM
Last Post: Serg
  __name__ and __main__ in functions Mark17 3 746 Oct-12-2023, 01:55 AM
Last Post: deanhystad
  Resolving ImportError: No module named gdb (Python in C++) mandaxyz 3 1,457 Oct-04-2023, 02:43 PM
Last Post: mandaxyz
  ModuleNotFoundError: No module named 'PyPDF2' Benitta2525 1 1,517 Aug-07-2023, 05:32 AM
Last Post: DPaul
  ModuleNotFoundError: No module named 'eyed3' Wimpy_Wellington 2 1,344 Jul-10-2023, 03:37 AM
Last Post: Wimpy_Wellington
  How to fix this error: ModuleNotFoundError: No module named 'notears' yaoyao22 2 1,042 Jul-09-2023, 11:24 AM
Last Post: yaoyao22
  Help with pyinstaller "No module named" korenron 9 9,127 Jun-15-2023, 12:20 PM
Last Post: snippsat
  Problem with Pyinstaller. No module named '_tkinter' tonynapoli2309 0 1,017 May-15-2023, 02:38 PM
Last Post: tonynapoli2309

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020