eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.46k stars 314 forks source link

Cactus doesn't work on El Capitan #191

Open pixelmai opened 8 years ago

pixelmai commented 8 years ago

Hi,

Recently upgraded my OS from Mavericks to El Capitan. Now the app once you turn one project, you cannot switch it off to change it, and I it doesn't run the local server anymore.

Thanks!

pixelmai commented 8 years ago

Also, everytime I opened and reopened Cactus, it removed the listed projects one by one. Now its currently empty.

screen shot 2015-10-02 at 6 28 16 am

krallin commented 8 years ago

@koenbok , this is another Mac App issue — I can't do anything about it. Can you have a look?

callil commented 8 years ago

+1 I'm running into the same exact problem.

jasonmelgoza commented 8 years ago

I'm having the same issue, here's what I'm seeing from the Cactus console:

Traceback (most recent call last):
File "/Applications/Cactus.app/Contents/Resources/python/run.py", line 32, in <module>
from cactus import cli
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/__init__.py", line 4, in     <module>
from cactus.site import Site
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/site.py", line 32, in <module>
from cactus.listener import Listener
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/listener/__init__.py", line 7, in <module>
from mac import FSEventsListener
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/listener/mac.py", line 33, in <module>
libc = CDLL('libc.dylib')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libc.dylib, 6): image not found 
adlermedrado commented 8 years ago

I'm having the exact same problem as @jasonmelgoza.

lagr8dane commented 8 years ago

Me too. Help!

On Oct 5, 2015, at 12:38 PM, Adler Brediks Medrado notifications@github.com wrote:

I'm having the exact same problem as @jasonmelgoza https://github.com/jasonmelgoza.

— Reply to this email directly or view it on GitHub https://github.com/koenbok/Cactus/issues/191#issuecomment-145593675.

wconcepts commented 8 years ago

@pixelmai I was able to locate my sites in /Documents/—the folders are marked with a Cactus logo. You can then drag them back into Cactus.

But, failing on El Capitan here too.

adlermedrado commented 8 years ago

I got this stack trace:

Traceback (most recent call last):
File "/Applications/Cactus.app/Contents/Resources/python/run.py", line 32, in <module>
from cactus import cli
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/__init__.py", line 4, in <module>
from cactus.site import Site
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/site.py", line 32, in <module>
from cactus.listener import Listener
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/listener/__init__.py", line 7, in <module>
from mac import FSEventsListener
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/listener/mac.py", line 33, in <module>
libc = CDLL('libc.dylib')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libc.dylib, 6): image not found
krallin commented 8 years ago

Can (one of) you try replacing the contents of /Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/listener/__init__.py with:

import logging

from cactus.listener.polling import PollingListener

logger = logging.getLogger(__name__)

try:
    from mac import FSEventsListener as Listener
except (ImportError, OSError):
    logger.warning("Failed to load FSEventsListener", exc_info=True)
    Listener = PollingListener

Let me know if that makes the issue go away.

This isn't a complete fix... but it's pretty close to the best I can do without access to the Mac app source code or a repro.

Cheers,


Note: this is the source of the original file: https://github.com/koenbok/Cactus/blob/master/cactus/listener/__init__.py

adlermedrado commented 8 years ago

Hi @krallin, I did the replacement and it is working better now. Thanks,

screen shot 2015-10-06 at 15 22 54
krallin commented 8 years ago

Glad to hear it @adlermedrado!

I pushed the updated file to the main Cactus tree.

@koenbok, can we do something about an update of Cactus.app?

krallin commented 8 years ago

Better option, you might want to try replacing

libc = CDLL('libc.dylib')

With:

libc = CDLL('/usr/lib/libc.dylib')

In /Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/listener/mac.py.

This should get you the more efficient events-based listener on El Capitan (which is the behavior you'd see on an earlier version).

Cheers,

adlermedrado commented 8 years ago

Done. Thanks.

krallin commented 8 years ago

Thanks for confirming, @adlermedrado.

For what it's worth,you probably want to keep both fixes as mentioned above :)

Cheers,

lagr8dane commented 8 years ago

Hey,

Can you help me out with the location of the suggestion below?

Thanks!

Marco

On Oct 6, 2015, at 3:00 PM, Thomas Orozco notifications@github.com wrote:

Better option, you might want to try replacing

libc = CDLL('libc.dylib') With:

libc = CDLL('/usr/lib/libc.dylib') This should get you the more efficient events-based listener on El Capitan (which is the behavior you'd see on an earlier version).

Cheers,

— Reply to this email directly or view it on GitHub https://github.com/koenbok/Cactus/issues/191#issuecomment-145966101.

krallin commented 8 years ago

@lagr8dane

This goes in /Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/listener/mac.py, on line 33

Cheers,

wconcepts commented 8 years ago

Thanks a mil, @krallin !!

pixelmai commented 8 years ago

Hello, I tried both the quick fixes, and it does get Cactus working again. Big thanks!

But the projects still vanishes everytime Cactus is opened/reopened.

krallin commented 8 years ago

@pixelmai ,

Do you have a stack trace or anything? Unfortunately I don't have access to the Mac app source code, so if the issue is in the app and not the underlying Cactus CLI, it's going to be difficult for me to do much about it :-1:

Cheers,

jdsimcoe commented 8 years ago

@pixelmai @krallin I'm getting this same issue.

Here is my stack trace I get when I have saved a project, close the app, and then try to re-open the app:

https://gist.github.com/jdsimcoe/4a6fcf1b6f0f2befb81f

koenbok commented 8 years ago

Hey everyone, I finally had some time to fix this. Please download the latest from cactusformac.com and let me know how it runs!

jdsimcoe commented 8 years ago

@koenbok Installed the latest and it still doesn't save sites in history and previewing of sites seems to be broken. Did you incorporate @krallin's changes that he has called out in this thread? His changes at least got Cactus working but saving sites on restart was still broken.

etlsnhy commented 8 years ago

Sorry, still not working here either. Each time I start up Cactus it looses the site list.

Not sure if this has been covered elsewhere, but I'm also getting the following error whenever I try to run a site:

File "/Applications/Cactus.app/Contents/Resources/python/run.py", line 32, in from cactus import cli File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/cli.py", line 9, in import colorama ImportError: No module named colorama

lagr8dane commented 8 years ago

Hi,

Same issue on my end.

Marco

On Oct 12, 2015, at 4:02 AM, etlsnhy notifications@github.com wrote:

Sorry, still not working here either. Each time I start up Cactus it looses the site list.

Not sure if this has been covered elsewhere, but I'm also getting the following error whenever I try to run a site:

File "/Applications/Cactus.app/Contents/Resources/python/run.py", line 32, in from cactus import cli File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/cli.py", line 9, in import colorama ImportError: No module named colorama

— Reply to this email directly or view it on GitHub https://github.com/koenbok/Cactus/issues/191#issuecomment-147322852.

lagr8dane commented 8 years ago

I am having the exact same issue, will not publish either. Please help, as I cannot seem to publish manually either. Replacing the index.html on S3 is causing all sorts of issues, and I cannot update my site at all. I am somewhat dead in the water!

Happy to pay if that is what it will take, I love Cactus, but am being hit with is prickly spines right now.

Traceback (most recent call last): File "/Applications/Cactus.app/Contents/Resources/python/run.py", line 32, in from cactus import cli File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/cli.py", line 9, in import colorama ImportError: No module

From: etlsnhy Reply-To: koenbok/Cactus Date: Monday, October 12, 2015 at 4:02 AM To: koenbok/Cactus Cc: Marco Rota Subject: Re: [Cactus] Cactus doesn't work on El Capitan (#191)

Sorry, still not working here either. Each time I start up Cactus it looses the site list.

Not sure if this has been covered elsewhere, but I'm also getting the following error whenever I try to run a site:

File "/Applications/Cactus.app/Contents/Resources/python/run.py", line 32, in from cactus import cli File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/cli.py", line 9, in import colorama ImportError: No module named colorama

— Reply to this email directly or view it on GitHub.

chernushevich commented 8 years ago

Getting the same error as @etlsnhy:

import colorama ImportError: No module named colorama

jasonmelgoza commented 8 years ago

@koenbok just downloaded the update, now I'm seeing this after trigging a preview:

Traceback (most recent call last):
File "/Applications/Cactus.app/Contents/Resources/python/run.py", line 32, in <module>
from cactus import cli
File "/Applications/Cactus.app/Contents/Resources/python/CactusSource/cactus/cli.py", line 9, in <module>
import colorama
ImportError: No module named colorama
lesly commented 8 years ago

Well, I do not now if it's work for everyone but I get the very same problem. I fix this by opening the terminal and install cactus with:

sudo easy_install cactus

and now when I run the app everything work ;).

wconcepts commented 8 years ago

Thanks @lesly !! Worked a charm for me. Looks like it installed all of the dependencies it needed.

lesly commented 8 years ago

Glad to help ;).

krallin commented 8 years ago

@koenbok It looks like your updated version is missing colorama as a dependency?

Cheers,

L-A commented 8 years ago

Here's an update on the state of things with 1.1.22. I'll try to point to the right open issues, as this one is blanket-ish:

Running El Cap 10.11.1

joshuakarjala commented 8 years ago

with 1.1.22 I still get errors when deploying

S3ResponseError: 301 Moved Permanently <?xml version="1.0" encoding="UTF-8"?> <Error><Code>PermanentRedirect</Code><Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message><Bucket>*****.***</Bucket><Endpoint>*****.***.s3.amazonaws.com</Endpoint><RequestId>8813F966B27016E9</RequestId><HostId>I45/V0bEhYBYakXDkK2SlkwpGMB8+ZAUwoO+PeFveqqI/fVG4ZB9dypFZiMgJqU9oc0bIrjQtlk=</HostId></Error>

andrewclo commented 8 years ago

@joshuakarjala also still experiencing the same issue.

joshuakarjala commented 8 years ago

@andrewclo with newest version of Cactus 1.1.22 if you are using a bucket not in us-east-1 then you need to add

"aws-bucket-region": "eu-west-1" (or what ever region you are in)

to your config.json

andrewclo commented 8 years ago

@joshuakarjala many thanks!

aaronstezycki commented 8 years ago

Any word on ETA for El Captain fixes? I still cannot, (even if I downgrade to a previous Cactus version) get Cactus to compile or preview a website.