Python Forum
ModuleNotFoundError: No module named '__main__.vtt'; '__main__' is not a package - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: ModuleNotFoundError: No module named '__main__.vtt'; '__main__' is not a package (/thread-12645.html)

Pages: 1 2 3


RE: ModuleNotFoundError: No module named '__main__.vtt'; '__main__' is not a package - MM2018 - Sep-11-2018

Thanks for reply! Yes, making windows .exe setup would be really cool idea!
Now I assume why it works only for MacOSX. By the way I checked issue section on github, some windows users said it worked.
https://github.com/antiboredom/videogrep/issues/29
I have tested latest Ubuntu linux, but same problem happened like Windows.
I checked some months ago, miguel user has same problem, so he find alternative.
I hope you can take a look into this.
https://python-forum.io/Thread-How-to-configure-Videogrep-and-PlayPhrase-on-my-Windows-7-x64?highlight=videogrep
This script works on windows, sometime it buggy not work like videogrep(I have tested), https://github.com/kelciour/playphrase,
but kelciour did not included editing option like videogrep.


RE: ModuleNotFoundError: No module named '__main__.vtt'; '__main__' is not a package - Axel_Erfurt - Sep-11-2018

I don't understand why you are using python myvideogrep.py

Quote:Videogrep is a command line tool that searches through dialog in video files

Quote:How to use it!

The most basic use:

videogrep --input path/to/video_or_folder --search 'search phrase'



RE: ModuleNotFoundError: No module named '__main__.vtt'; '__main__' is not a package - snippsat - Sep-11-2018

(Sep-11-2018, 03:47 PM)Axel_Erfurt Wrote: I don't understand why you are using python myvideogrep.py
Because he try to run it Windows,then that's the only way.
If you read my post,i explain why it not work as command line tool on Windows.


RE: ModuleNotFoundError: No module named '__main__.vtt'; '__main__' is not a package - MM2018 - Sep-11-2018

(Sep-11-2018, 03:47 PM)Axel_Erfurt Wrote: I don't understand why you are using python myvideogrep.py

Quote:Videogrep is a command line tool that searches through dialog in video files

Quote:How to use it!

The most basic use:

videogrep --input path/to/video_or_folder --search 'search phrase'
Did you read from first post, you may get it easily.


RE: ModuleNotFoundError: No module named '__main__.vtt'; '__main__' is not a package - MM2018 - Oct-01-2018

(Sep-11-2018, 12:47 PM)snippsat Wrote: 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.

will you tell me where to put entry_points, thanks.


RE: ModuleNotFoundError: No module named '__main__.vtt'; '__main__' is not a package - MM2018 - Oct-11-2018

may be wait for antibordom untill he will setup for windows.


RE: ModuleNotFoundError: No module named '__main__.vtt'; '__main__' is not a package - MM2018 - Oct-12-2018

I think it works only with MacOSX!
Tested on latest ubuntu using virtualbox!
I am getting same error like windows
yl@yl-VirtualBox:~$ videogrep -i /media -s "Rule" -st word -o test.mp4
[!] No subtitle files were found.
Traceback (most recent call last):
  File "/home/yl/.local/bin/videogrep", line 5, in <module>
    videogrep.main()
  File "/home/yl/.local/lib/python2.7/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 "/home/yl/.local/lib/python2.7/site-packages/videogrep/videogrep.py", line 456, in videogrep
    composition = compose_from_srts(srts, search, searchtype)
  File "/home/yl/.local/lib/python2.7/site-packages/videogrep/videogrep.py", line 317, in compose_from_srts
    for srt in srts:
TypeError: 'bool' object is not iterable
yl@yl-VirtualBox:~$ 
I tried on different file(added .srt file same folder), same error!