Can't get Mylar3 running on Windows because of Pillow/PIL

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
wyldphyre
Posts: 6
Joined: Wed Jun 24, 2015 10:34 am

Can't get Mylar3 running on Windows because of Pillow/PIL

Post by wyldphyre »

Hi

I'm trying to upgrade my mylar install to Mylar3 on Windows 10 and seem to be stuck on a Pillow/PIL thing.

I cloned the new version (9ec6b1c, I think) and followed the instructions to move my install over, installing Python 3.9.6 in the process. When it came to installing the requirements it failed on pillow, saying there weren't binaries for Windows yet. After searching the forum I noticed someone mention that you could comment Pillow out in the requirements and install it manually, which I've done (version 8.3.1).

The problem I have now is that when I try to run Mylar I get the error below.

Is anyone able to tell help me resolve this? Python isn't really my thing.

Thanks

Code: Select all

Traceback (most recent call last):
  File "C:\mylar3\mylar\getimage.py", line 23, in <module>
    from PIL import Image
  File "C:\Python3\lib\site-packages\PIL\Image.py", line 114, in <module>
    from . import _imaging as core
ImportError: DLL load failed while importing _imaging: %1 is not a valid Win32 application.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\mylar3\Mylar.py", line 26, in <module>
    import mylar
  File "C:\mylar3\mylar\__init__.py", line 41, in <module>
    from mylar import logger, versioncheckit, rsscheckit, searchit, weeklypullit, PostProcessor, updater, helpers
  File "C:\mylar3\mylar\logger.py", line 24, in <module>
    from mylar import helpers
  File "C:\mylar3\mylar\helpers.py", line 42, in <module>
    from mylar import db, sabnzbd, nzbget, process, getcomics, getimage
  File "C:\mylar3\mylar\getimage.py", line 28, in <module>
    logger.warn('[WARNING] PIL is not available - it\'s used to resize images for notifications, and other things.')
NameError: name 'logger' is not defined
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Can't get Mylar3 running on Windows because of Pillow/PIL

Post by evilhero »

Can you check to see what python modules you have installed via the pip command ? pip list from the command line is how you can display the listing (or if you start python as python3 it would be pip3, if you start it as python3.9 it would pip3.9, etc).

If you see Pillow in that list - you probably need to uninstall the version of Pillow you installed. Then do the pip list command again to make sure it's not installed. If you installed Pillow via some other method than using pip, you need to make sure it's uninstalled. You also need to make sure that you do not have PIL installed - as you cannot have both PIL and Pillow installed on the same machine from what I've read previously.

Once you made sure you don't have any version installed, then you would install it via the pip command (pip install pillow) - which should install the latest.

At that point, you would then need to do the requirements.txt file installation with the Pillow line removed (as per the mylar3 readme - typically it's something like pip install -r requirements.txt from the command line in the directory where Mylar resides).

Note that as of today - the latest master branch has the Pillow requirement upgraded to a minimum of 8 (ie. PIllow >=8), so there's no need to comment it out if you are installing an up-to-date version.

Now in saying all of that I noticed that you're getting a DLL error and a logger error - the logger error is a bug that I'm going to patch up shortly, but the DLL error is related to the installation of Pillow on your system conflicting with another version of either PIL or PIllow.
wyldphyre
Posts: 6
Joined: Wed Jun 24, 2015 10:34 am

Re: Can't get Mylar3 running on Windows because of Pillow/PIL

Post by wyldphyre »

Excellent. I have it running now. Thanks so much.

I uninstalled Pillow via pip, got rid of my requirements fiddle, pulled the latest, and this time installing the requirements was fine. I'm guessing I failed to fiddle the requirements file properly.

Thanks again.
Post Reply