MCV-Software / TWBlue

TWBlue, an accessible, open source and multiplatform twitter application.
GNU General Public License v2.0
59 stars 36 forks source link

Coercing to Unicode Error Occurs when Expanding URL's from Several Services #179

Closed Mohamed00 closed 6 years ago

Mohamed00 commented 7 years ago

Steps to reproduce.

  1. Try to expand a URL from a shortener such as if.tt, bit.ly, or another service, example url: (leads to a Redmond Pie article) http://bit.ly/2AwczKa.

    Expected.

    The URL expands and the URL the shortener redirects to is displayed.

    Actual.

    The URL fails to expand and the following traceback is displayed. Traceback (most recent call last): File "c:\twblue\src\controller\messages.py", line 77, in unshorten self.message.set_text(self.message.get_text().replace(urls[0], url_shortener.unshorten( urls[0]))) TypeError: coercing to Unicode: need string or buffer, NoneType found.

codeofdusk commented 7 years ago

All of this madness should be fixed when #169 is merged.

On Nov 12, 2017, at 10:46 AM, Mohamed Al-Hajamy notifications@github.com wrote:

Steps to reproduce.

Try to expand a URL from a shortener such as if.tt, bit.ly, or another service, example url: (leads to a Redmond Pie article) http://bit.ly/2AwczKa http://bit.ly/2AwczKa. Expected.

The URL expands and the URL the shortener redirects to is displayed.

Actual.

The URL fails to expand and the following traceback is displayed. Traceback (most recent call last): File "c:\twblue\src\controller\messages.py", line 77, in unshorten self.message.set_text(self.message.get_text().replace(urls[0], url_shortener.unshorten( urls[0]))) TypeError: coercing to Unicode: need string or buffer, NoneType found.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/manuelcortez/TWBlue/issues/179, or mute the thread https://github.com/notifications/unsubscribe-auth/ACXIS-BBSiEFCTVdGLpbO9C4U_d1-w-Kks5s1sx9gaJpZM4Qa1bZ.

codeofdusk commented 7 years ago

If you’d like to test, do

git clone --recursive https://github.com/codeofdusk/twblue
cd twblue
git checkout py3

Then follow the directions at: https://github.com/codeofdusk/TWBlue/blob/py3/README.md https://github.com/codeofdusk/TWBlue/blob/py3/README.md Note that this build is somewhat untested and may have other bugs! I'm using it myself with (almost) no issues.

jmdaweb commented 7 years ago

Bill, we know we have to port to Python 3, but please, don't give this solution as the only available alternative! We have to know why url_shortener returns None when expanding this url.

Regards.

El 12/11/2017 a las 16:37, Bill Dengler escribió: If you’d like to test, do Git clone https://github.com/codeofdusk/twblue https://github.com/codeofdusk/twbluehttps://github.com/codeofdusk/twblue Cd twblue Git checkout py3

Then follow the directions at: https://github.com/codeofdusk/TWBlue/blob/py3/README.md https://github.com/codeofdusk/TWBlue/blob/py3/README.mdhttps://github.com/codeofdusk/TWBlue/blob/py3/README.md

Bill

On Nov 12, 2017, at 10:46 AM, Mohamed Al-Hajamy notifications@github.commailto:notifications@github.com wrote:

Steps to reproduce.

Try to expand a URL from a shortener such as if.tt, bit.ly, or another service, example url: (leads to a Redmond Pie article) http://bit.ly/2AwczKa http://bit.ly/2AwczKahttp://bit.ly/2AwczKa. Expected.

The URL expands and the URL the shortener redirects to is displayed.

Actual.

The URL fails to expand and the following traceback is displayed. Traceback (most recent call last): File "c:\twblue\src\controller\messages.py", line 77, in unshorten self.message.set_text(self.message.get_text().replace(urls[0], url_shortener.unshorten( urls[0]))) TypeError: coercing to Unicode: need string or buffer, NoneType found.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/manuelcortez/TWBlue/issues/179https://github.com/manuelcortez/TWBlue/issues/179, or mute the thread https://github.com/notifications/unsubscribe-auth/ACXIS-BBSiEFCTVdGLpbO9C4U_d1-w-Kks5s1sx9gaJpZM4Qa1bZhttps://github.com/notifications/unsubscribe-auth/ACXIS-BBSiEFCTVdGLpbO9C4U_d1-w-Kks5s1sx9gaJpZM4Qa1bZ.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/manuelcortez/TWBlue/issues/179#issuecomment-343745545, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJXb7F0BXeib86wuWFgosVqR-GoeLfXuks5s1xCygaJpZM4Qa1bZ.

jmdaweb commented 6 years ago

This is fixed, but take into account that if you try to expand an expanded URL, TWBlue might freeze for some time. Use the expand button only if you are sure that the URL is shortened.

Mohamed00 commented 6 years ago

Hmm. It seems audio is timing out when played now. It seems to freeze the client for some time then fail to play. Trying to play it again several times doesn't help either, and the audio seems to be working.

Mohamed00 commented 6 years ago

Disregard the previous comment. I think it was a network issue. Apologies.