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

Python3 upload error #40

Open
HelloThere4587 opened this issue Nov 12, 2019 · 2 comments
Open

Python3 upload error #40

HelloThere4587 opened this issue Nov 12, 2019 · 2 comments

Comments

@HelloThere4587
Copy link

Hello there,

I have issues uploading subtitles, my code is simple:

... 
if not already_in_db:
    params = {'baseinfo': {
        'idmovieimdb': imdb_id
    },
        'cd1': {
            'subhash': sub_hash,
            'subfilename': filename,
            'subcontent': get_gzip_base64_encoded(file)
        }}
    url = ost.upload_subtitles(params)

And I have the project using the setup.py file installed and use Python 3.7 on Debian 10.

The issue is that the upload does not work (instead of the url None is returned) and if I use the debugger I get the following output:

error
The file is located in /usr/lib/python3.7/xmlrpc/client.py .

But the code runs without issues if I use Python2 instead.

I hope this helps fixing the issue and thank you for this project 😃

@agonzalezro
Copy link
Owner

Sorry @HelloThere4587, I completely missed this issue.

Did you manage to make it work somehow with python 3? If not, could you provide all the test info: hashes, gzip of the subtitle, etc... that you used to reach that point where it fails?

@MrCirdo
Copy link
Contributor

MrCirdo commented Dec 20, 2021

Hi,

I got similar issue. And I fix it with this method :

if not already_in_db:
    params = {'baseinfo': {
        'idmovieimdb': imdb_id
    },
        'cd1': {
            'subhash': sub_hash,
            'subfilename': filename,
            'subcontent': str(get_gzip_base64_encoded(file)) # add str here.
        }}
    url = ost.upload_subtitles(params)

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

3 participants