dailybruin / meow

Daily Bruin's homemade social media manager
GNU Affero General Public License v3.0
58 stars 15 forks source link

Invalid URL 'None': No schema supplied. Perhaps you meant http://None? #160

Open jeromecc opened 6 years ago

jeromecc commented 6 years ago

Hello! I built meow just a few hours ago (after commit https://github.com/daily-bruin/meow/commit/b44169947c5a25694e5125f90ed01f5728a39f7c).

I get this error message when I am trying to send a post:

This post did not send correctly. Here's the error message: [2018-06-05 06:33:50.639298] - Traceback (most recent call last): File "/meow/meow/scheduler/management/commands/sendposts.py", line 296, in handle headers={'Content-Type': 'application/json'}) File "/venv/lib/python3.6/site-packages/requests/api.py", line 112, in post return request('post', url, data=data, json=json, kwargs) File "/venv/lib/python3.6/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, kwargs) File "/venv/lib/python3.6/site-packages/requests/sessions.py", line 494, in request prep = self.prepare_request(req) File "/venv/lib/python3.6/site-packages/requests/sessions.py", line 437, in prepare_request hooks=merge_hooks(request.hooks, self.hooks), File "/venv/lib/python3.6/site-packages/requests/models.py", line 305, in prepare self.prepare_url(url, params) File "/venv/lib/python3.6/site-packages/requests/models.py", line 379, in prepare_url raise MissingSchema(error) requests.exceptions.MissingSchema: Invalid URL 'None': No schema supplied. Perhaps you meant http://None? Error: Jerome 2018-06-05 06:33:50.643424 -- Invalid URL 'None': No schema supplied. Perhaps you meant http://None?

What could be the problem?

Could you tag a commit known to work (or maybe make a release or pre-release if you have time?) so that I can be sure that the problem comes from me, my settings, Twitter, or my general ignorance of all things Python / Django rather that a naughty bug?

Update: despite this ominous error message, the tweet was posted on Twitter! :-)

Thanks! This app is exactly what I was looking for in the language I like, I hope I can get it to work.

hongee commented 6 years ago

Hi @jeromecc! It looks like you haven't set the SLACK_ENDPOINT environment variable (it needs to go in the .env file). This is a slack webhook that we use to notify ourselves when tweets and facebook posts go out - but unfortunately there's no way to disable this feature for now.

I think it'll be useful to make this optional through a simple check of whether the endpoint is set (@dustinnewman98). Also thanks so much for trying this out! We have only been using this tool in house and we'd love to hear your feedback and comments!

jeromecc commented 6 years ago

Ok, I understand! This project is so well maintained and looks so professional that I realized it was an in house project for dailybruin.com newspaper only after I sent the comment. It also explains why the Slack channel is reserved for people with an UCLA email. :-) I will try to do what you suggested on my fork and to send a pull request. Thanks to all devs and contributors for sharing their work publicly and for using a GNU license!