Skip to content
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

urlstring corruption above 254 character path. pyaaf2 or AMC? #123

Open
CronenbergRick opened this issue Jan 7, 2024 · 2 comments
Open

Comments

@CronenbergRick
Copy link

CronenbergRick commented Jan 7, 2024

Hi Mark. thanks for all the work you've put into building this library.
I'm very new to programming, so please accept my apologies if this is an obvious thing to figure out by ones self.

when I use pyaaf2 and dump() a test file to txt:

with aaf2.open(input_file, "r") as f:
    with open(output_file, "w", encoding='utf-8') as out_file, io.StringIO() as buf:
        original_stdout = sys.stdout
        sys.stdout = buf 
        f.dump()
        sys.stdout = original_stdout  
        out_file.write(buf.getvalue())

I get a file where the 'unc path' under 'user comments' looks healthy regardless of length, but the 'URLString' under 'locator' gets wonky if the file path is over 254 chars long.

Is this pyaaf2 having the issue? or is this Avid Media Composer having the issue when exporting? or is this maybe running the script from windows having the issue?

The url path will show up like this:
URLString file://server/share/musicdepartment/subfolder/2023%20sick%20tunes%20bro/pretend%20this%20longer/too-fast-too-furious-stems왂翸
symbols at the end, then cut off
while the unc path would have the full
S:\share\musicdepartment\subfolder\2023 sick tunes bro\pretend this longer\too-fast-too-furious-stems-because-fambly.aiff

If it matters, I've been running the script from a Windows environment, and yes, the %20 conversion of a 'space' does count against the 254 limit by 3 characters.

@CronenbergRick
Copy link
Author

dumping from Ubuntu instead of Windows doesn't alter the results.

@markreidvfx
Copy link
Owner

pyaaf has no path limits for urls it just treats them the same as any string property. Window does use a different encoding for stdout/err in terminals by default. I think it's cp1252 or something like that. That could be that messing it up somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants