You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import pysubs2
pysubs2.load('subtitle.ass','utf-8')
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'load'
I use pysubs2 in Django
I think there maybe some problem about import path, but I can't figure it out.
could you check this?
could you check it
The text was updated successfully, but these errors were encountered:
Hi, pysubs2 works with 2.7, it must be something else.
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysubs2
>>> subs = pysubs2.load("c:/subs.ass")
>>> subs
<SSAFile with 943 events and 45 styles, last timestamp 0:25:40>
Since you don't get an ImportError, try printing pysubs2.__file__. I think the problem is that you have a file named pysubs2.py somewhere, and Python imports that script instead of the library it should. If the very script you're trying to use pysubs2 from is called pysubs2.py, the script will happily import itself without an ImportError... I was bitten by this many times myself :-)
I use pysubs2 in Django
I think there maybe some problem about import path, but I can't figure it out.
could you check this?
could you check it
The text was updated successfully, but these errors were encountered: