Bug with Watchman on Windows

49 views
Skip to first unread message

David V

unread,
Aug 31, 2022, 4:12:33 PM8/31/22
to Django users
Hello All,

Apologies if this is the wrong place to submit this. I couldn't find clear enough documentation on where to do this, so I guess I ended up here.

I installed pywatchman along with FB's watchman expecting StatReloader to change to WatchmnaReloader. Sadly, I was mistaken.

Python version: 3.9
Django version: 4.1
pywatchman version: 1.4.1
OS: Windows 11
PyCharm version: 2022.2.1
conda environment

Steps to reproduce:
Install Django
Install pywatchman
Install Watchman
Confirm Watchman is running
Start a django project
run: python manage.py runserver

I tracked the issue down to django.utils.autoreload.py. It seems that on client.capabilityCheck(), optional is a keyword argument set equal to None (optional=None), which is a problem because later when pywatchman call capabilities.synthesize() in pywatchman.capabilityCheck() (line 1079), it doesn't work because a for loop gets called on optional that was passed in. In Python for x in None: does not work. Could we get a kwarg added optional = [ ] in the function call for result = cliient.capabilityCheck() on line 628 in autoreload.py? I was able to sidestep the issue by inserting version = (4, 9) above line 627 where the try:...except:... is initialized in check_availability and then commenting out lines 627–632—try:...version = get_vers....

I know that then it won't provide the correct Watchman version, but it would be nice if it worked out of the box like it is supposed to.

Please let me know what further steps I should take to make sure that watchman works out of the box like it is supposed to.

Thanks,

David V.

Kasper Laudrup

unread,
Aug 31, 2022, 5:00:47 PM8/31/22
to django...@googlegroups.com
On 31/08/2022 18.52, David V wrote:
> Hello All,
>
> Apologies if this is the wrong place to submit this. I couldn't find
> clear enough documentation on where to do this, so I guess I ended up here.
>

Maybe open an issue on the issue tracker on github?

https://github.com/facebook/watchman

Kind regards,

Kasper Laudrup
OpenPGP_0xE5D9CAC64AAA55EB.asc
OpenPGP_signature

subin

unread,
Sep 1, 2022, 2:54:41 PM9/1/22
to django...@googlegroups.com
Our team is out spending time with loved ones. We’ll be back on November 29 to respond to your text. Have a great Thanksgiving weekend!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8dad35c6-0442-4cdb-837b-5629dc89ffdan%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages