Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec format error: glee #2

Open
Kevin-free opened this issue Sep 9, 2023 · 17 comments
Open

exec format error: glee #2

Kevin-free opened this issue Sep 9, 2023 · 17 comments

Comments

@Kevin-free
Copy link

> glee sample_post.md
zsh: exec format error: glee

How to troubleshoot?

@shrsv
Copy link
Contributor

shrsv commented Sep 9, 2023

Which OS are you running this on? Is it Mac OS by any chance?

@Kevin-free
Copy link
Author

Which OS are you running this on? Is it Mac OS by any chance?

yeah, Mac OS 12.6.3

@shrsv
Copy link
Contributor

shrsv commented Sep 9, 2023

Got it; we are working on Mac OS support; should be out soon. Meanwhile, you can still clone the repo and run glee.py as a temporary measure.

I will update this thread once the Mac release is ready.

@Kevin-free
Copy link
Author

I executed wget -O - https://raw.githubusercontent.com/HexmosTech/glee/main/install.sh | bash

.glee.toml sets ghost, but several parameters of aws-s3 are empty strings. It should not matter, right?

@Kevin-free
Copy link
Author

Got it; we are working on Mac OS support; should be out soon. Meanwhile, you can still clone the repo and run glee.py as a temporary measure.

I will update this thread once the Mac release is ready.

OK, Thanks!

@shrsv
Copy link
Contributor

shrsv commented Sep 9, 2023

I executed wget -O - https://raw.githubusercontent.com/HexmosTech/glee/main/install.sh | bash

.glee.toml sets ghost, but several parameters of aws-s3 are empty strings. It should not matter, right?

Place .glee.toml at ~ and fill in the Ghost credentials. AWS credentials matter if you want to include images.

We are working on a Ghost-only image upload solution (already underway). That too will be released soon.

@Kevin-free
Copy link
Author

I executed wget -O - https://raw.githubusercontent.com/HexmosTech/glee/main/install.sh | bash
.glee.toml sets ghost, but several parameters of aws-s3 are empty strings. It should not matter, right?

Place .glee.toml at ~ and fill in the Ghost credentials. AWS credentials matter if you want to include images.

We are working on a Ghost-only image upload solution (already underway). That too will be released soon.

Does .glee.toml have to be placed in ~? I cloned the project and am trying it out. I am also very interested in efficient publish ghost. Come on!

@shrsv
Copy link
Contributor

shrsv commented Sep 9, 2023

Yes, config file must be placed at home directory. If you don't have a config, it will prompt to create it for you, so don't worry about it.

Just get the python dependencies (poetry install), start shell (poetry shell) and trigger glee.py on a markdown file.

@Kevin-free
Copy link
Author

Yes, config file must be placed at home directory. If you don't have a config, it will prompt to create it for you, so don't worry about it.

Just get the python dependencies (poetry install), start shell (poetry shell) and trigger glee.py on a markdown file.

Thanks!
I have been stuck at Installing Poetry (1.6.1): Installing Poetry. After waiting for a long time, there is no progress. The network is normal. How to troubleshoot and solve it?

@shrsv
Copy link
Contributor

shrsv commented Sep 9, 2023

I am not able to reproduce the issue locally., so it is related to your poetry setup.

Try these suggestions at poetry issues. Also, you can open the toml and try installing the dependencies globally with pip as well.

@Kevin-free
Copy link
Author

I am not able to reproduce the issue locally., so it is related to your poetry setup.

Try these suggestions at poetry issues. Also, you can open the toml and try installing the dependencies globally with pip as well.

Thanks, I ran it successfully.
I execute python glee.py sample_post.md and return Created new post, but there is no article in the ghost management console. why is that?

@shrsv
Copy link
Contributor

shrsv commented Sep 9, 2023

I am assuming there could be some minor issue with your config. Can you try uncommenting L103 and post the response here (after removing sensitive content, if any)? L111 too can be enabled for debugging.

Sorry, the logging/debug mode is still not fully formulated as of now.

@Kevin-free
Copy link
Author

I am assuming there could be some minor issue with your config. Can you try uncommenting L103 and post the response here (after removing sensitive content, if any)? L111 too can be enabled for debugging.

Sorry, the logging/debug mode is still not fully formulated as of now.

I don' t know how to troubleshoot, can u provide some help?

> python glee.py sample_post.md
Traceback (most recent call last):
  File "/Users/kevin/Library/Caches/pypoetry/virtualenvs/glee-fXMZp2bW-py3.11/lib/python3.11/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/kevin/1-GR个人/16-XMDM项目代码/162-CKXM参考项目/glee/glee.py", line 197, in <module>
    post_to_ghost(post.metadata, post.content)
  File "/Users/kevin/1-GR个人/16-XMDM项目代码/162-CKXM参考项目/glee/glee.py", line 181, in post_to_ghost
    return make_request(token, body, meta["slug"])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kevin/1-GR个人/16-XMDM项目代码/162-CKXM参考项目/glee/glee.py", line 103, in make_request
    print(r.json())
          ^^^^^^^^
  File "/Users/kevin/Library/Caches/pypoetry/virtualenvs/glee-fXMZp2bW-py3.11/lib/python3.11/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
# refer https://github.com/HexmosTech/glee#configuration for configuration details

[ghost-configuration] 
ADMIN_API_KEY = "64xxx:xxxfd"

GHOST_VERSION = "v5"

GHOST_URL = "http://localhost:2368"

[aws-s3-configuration]      # refer: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html
ACCESS_KEY_ID = ""          # eg: UZNN442KVSB7AQTOIAW2 refer: https://objectivefs.com/howto/how-to-get-amazon-s3-keys

SECRET_ACCESS_KEY = ""      # eg: 2gP5NeQ2KLkcKLkcPyRqhmzY3WSK2I+GmI/T4qQ255  refer:https://objectivefs.com/howto/how-to-get-amazon-s3-keys 

BUCKET = ""                 # eg: sample-fefwdedea

S3_BASE_URL = ""            # eg: https://sample-fefwdedea.s3.ap-south-1.amazonaws.com/  refer: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html

@LinceMathew
Copy link
Contributor

Hi, @Kevin-free right now aws-s3-configuration is mandatory for glee to work. we working on removing the s3 dependency. The new version will be published within 1 or 2 days.

@shrsv
Copy link
Contributor

shrsv commented Sep 10, 2023

Also, you can see the error message from ghost with the following:

print(r.text)

Presently, the returned value seems like it is not a JSON.

@LinceMathew
Copy link
Contributor

Hi @Kevin-free,

In the latest version of glee, the aws-s3-configuration is no longer mandatory. You have the option to store images directly in your Ghost database instead of s3. For more details, please refer to the image configuration documentation.

Additionally, we are addressing the glee command issue on macOS. We will notify you as soon as it is resolved.

@LinceMathew
Copy link
Contributor

Hi @Kevin-free

We have resolved the exec format error issue on Mac OS. To fix this, please update glee by running the following command:

wget -O - https://raw.githubusercontent.com/HexmosTech/glee/main/install.sh | bash

Please check and report to us if you face any issues with glee.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants