You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I reopened the issues because seems like my problem described in the closed ticket #777 was not well understood.
I try to use mloginfo but it fails to lunch because of a sytax error.
Expected behavior
mloginfo should work, and not having syntax errors.
Actual/current behavior
mloginfo /usr/local/var/mongodb/info.log --queries Traceback (most recent call last): File "/usr/local/bin/mloginfo", line 9, in <module> load_entry_point('mtools==1.6.1', 'console_scripts', 'mloginfo')() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 565, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2697, in load_entry_point return ep.load() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2370, in load return self.resolve() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2376, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/Library/Python/2.7/site-packages/mtools/mloginfo/mloginfo.py", line 75 timezone = f"UTC {tzdt.strftime('%z')}" ^ SyntaxError: invalid syntax
Steps to reproduce the actual/current behavior
Environment
I have installed in the machine python2 and python3.6
Software
Version
mtools
1.6.1
MongoDB server
4.2
Operating system
Mac OS X
python
2 and 3.6
The text was updated successfully, but these errors were encountered:
Simone-cogno
changed the title
mloginfo "SyntaxError: invalid syntax
mloginfo "SyntaxError: invalid syntax evens with python3.6 installed in the machine
Jan 27, 2020
Simone-cogno
changed the title
mloginfo "SyntaxError: invalid syntax evens with python3.6 installed in the machine
mloginfo "SyntaxError: invalid syntax even with python3.6 installed in the machine
Jan 27, 2020
Simone-cogno
changed the title
mloginfo "SyntaxError: invalid syntax even with python3.6 installed in the machine
mloginfo "SyntaxError: invalid syntax even with python3.6 installed on the machine
Jan 27, 2020
@Simone-cogno The Python path in your output indicates that you have installed mtools 1.6.1 into a Python 2.7 environment, which is not expected to be compatible with Python 3 syntax:
Please uninstall mtools and reinstall into a Python 3.6+ environment (or install an older mtools version which is compatible with your default Python).
If you have both Python 2 & 3 installed and Python 2 is your default, you can use pip3 install to install into Python 3. You can use pip --version or pip3 --version to confirm which Python interpreter is associated with the pip install.
If you are still have difficulties working out how to install into the relevant Python environment, I suggest posting a question on Stack Overflow.
I reopened the issues because seems like my problem described in the closed ticket #777 was not well understood.
I try to use mloginfo but it fails to lunch because of a sytax error.
Expected behavior
mloginfo should work, and not having syntax errors.
Actual/current behavior
mloginfo /usr/local/var/mongodb/info.log --queries Traceback (most recent call last): File "/usr/local/bin/mloginfo", line 9, in <module> load_entry_point('mtools==1.6.1', 'console_scripts', 'mloginfo')() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 565, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2697, in load_entry_point return ep.load() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2370, in load return self.resolve() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2376, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/Library/Python/2.7/site-packages/mtools/mloginfo/mloginfo.py", line 75 timezone = f"UTC {tzdt.strftime('%z')}" ^ SyntaxError: invalid syntax
Steps to reproduce the actual/current behavior
Environment
I have installed in the machine python2 and python3.6
The text was updated successfully, but these errors were encountered: