technologistpro / boxnote2docx

Convert Box Notes to Microsoft Word Documents
4 stars 0 forks source link

Can't run boxnote2docx on Mac #1

Open stefski-ibm opened 2 weeks ago

stefski-ibm commented 2 weeks ago

Am using Mac OS Sonoma 14.6.1 and python 2.7 ./boxnote2docx

Traceback (most recent call last): File "./boxnote2docx", line 12, in <module> from yattag import Doc File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/yattag/__init__.py", line 69, in <module> from yattag.simpledoc import SimpleDoc, AsIs File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/yattag/simpledoc.py", line 532 return f"\"{attr_escape(value)}\"" ^ SyntaxError: invalid syntax

technologistpro commented 2 weeks ago

Python 2.7 has been sunsetted. If you are on Mac, please try to install version 3.x.x and give it a go.

stefski-ibm commented 2 weeks ago

Still no joy - have you tried python3 ?

technologistpro commented 2 weeks ago

@stefski-ibm Yes, it works with python3. Please use the requirements.txt to get the modules needed. See below for a working environment that includes python3 and needed python modules.

$ python -V Python 3.9.7

$ pip list
Package Version


certifi 2022.12.7 charset-normalizer 3.0.1 docopt 0.6.2 idna 3.4 lxml 4.9.2 Pillow 9.4.0 pip 21.2.3 pipreqs 0.4.11 pypandoc 1.10 python-docx 0.8.11 requests 2.28.2 setuptools 57.4.0 urllib3 1.26.14 yarg 0.1.9 yattag 1.15.0

stefski-ibm commented 2 weeks ago

When you install Python3 you need to type python3 in a Terminal prompt. How did you get python to work instead of having to type python3 ? Download this macOS 64-bit universal2 installer

technologistpro commented 2 weeks ago

There are several ways to install Python. I use pyenv, which allows you to run different versions and choose the one you want as default:

$ pyenv versions                                                     
  system
  3.8.6
  3.9.7
* 3.10.13 (set by /Users/john/.pyenv/version)