AdventureData / radicl

Command line interface & API for using the Lyte probe. Users can take measurements, configure and update the probe with this software
https://adventuredata.com/
Other
3 stars 0 forks source link

radicl crashes in Windows when started #5

Open arothenbuhler opened 4 years ago

arothenbuhler commented 4 years ago

Description

radicl crashes right away when starting it from the command line.

Traceback (most recent call last): File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources__init.py", line 659, in _build_master ws.require(requires__) File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources__init.py", line 967, in require needed = self.resolve(parse_requirements(requirements)) File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources\init__.py", line 858, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (setuptools 28.8.0 (c:\users\adrian rothenbuhler\appdata\local\programs\python\python36\lib\site-packages), Requirement.parse('setuptools>=30.0.0'), {'tox'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\Scripts\radicl-script.py", line 6, in from pkg_resources import load_entry_point File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources__init.py", line 3017, in @_call_aside File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources__init__.py", line 3003, in _call_aside f(*args, **kwargs) File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources__init.py", line 3030, in _initialize_master_working_set working_set = WorkingSet._build_master() File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources\init__.py", line 661, in _build_master return cls._build_from_requirements(requires__) File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources__init.py", line 674, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources\init__.py", line 858, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (setuptools 28.8.0 (c:\users\adrian rothenbuhler\appdata\local\programs\python\python36\lib\site-packages), Requirement.parse('setuptools>=30.0.0'), {'tox'})

micahjohnson150 commented 4 years ago

Awesome thanks @arothenbuhler . I am working on it. I have a disconnect it looks like between develop and master. I am going to merge those together and push. So I may have you pull to confirm this is still the case

micahjohnson150 commented 4 years ago

could you try two things for me?

First pull from develop again.

then.

  1. Try radicl again
  2. try python radicl/cli.py
  3. python -c "import radicl"

Let me know if those fail, and if so their tracebacks.

arothenbuhler commented 4 years ago
  1. Still fails Traceback (most recent call last): File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources__init.py", line 659, in _build_master ws.require(requires__) File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources__init.py", line 967, in require needed = self.resolve(parse_requirements(requirements)) File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources\init__.py", line 858, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (setuptools 28.8.0 (c:\users\adrian rothenbuhler\appdata\local\programs\python\python36\lib\site-packages), Requirement.parse('setuptools>=30.0.0'), {'tox'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\Scripts\radicl-script.py", line 6, in from pkg_resources import load_entry_point File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources__init.py", line 3017, in @_call_aside File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources__init__.py", line 3003, in _call_aside f(*args, **kwargs) File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources__init.py", line 3030, in _initialize_master_working_set working_set = WorkingSet._build_master() File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources\init__.py", line 661, in _build_master return cls._build_from_requirements(requires__) File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources__init.py", line 674, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "C:\Users\Adrian Rothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources\init__.py", line 858, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (setuptools 28.8.0 (c:\users\adrian rothenbuhler\appdata\local\programs\python\python36\lib\site-packages), Requirement.parse('setuptools>=30.0.0'), {'tox'})

  1. Fails as well Traceback (most recent call last): File "radicl/cli.py", line 4, in from radicl.radicl import RADICL File "C:\radicl\radicl\radicl.py", line 10, in from radicl.ui_tools import Messages, parse_func_list, print_helpme, parse_help, get_logger ModuleNotFoundError: No module named 'radicl.ui_tools'; 'radicl' is not a package

  2. Works

micahjohnson150 commented 4 years ago

ok great. I think I am on to the reason. Standby.

micahjohnson150 commented 4 years ago

Could you post the result of pip freeze

arothenbuhler commented 4 years ago

pip install -r requirements.txt ended with: FileNotFoundError: [WinError 2] The system cannot find the file specified: 'c:\users\arothenbuhler\appdata\local\programs\python\python36\lib\site-packages\argparse-1.1-py3.6.egg'

Then pythong setup.py install seems to work ok, but running radicl still crashes:

Traceback (most recent call last): File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\Scripts\radicl-script.py", line 11, in load_entry_point('radicl==0.3.2', 'console_scripts', 'radicl')() File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\radicl-0.3.2-py3.6.egg\radicl\cli.py", line 58, in main out.msg(logo) File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\radicl-0.3.2-py3.6.egg\radicl\ui_tools.py", line 14, in msg print('\n'+msg) File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\colorama\ansitowin32.py", line 41, in write self.__convertor.write(text) File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\colorama\ansitowin32.py", line 162, in write self.write_and_convert(text) File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\colorama\ansitowin32.py", line 187, in write_and_convert self.write_plain_text(text, cursor, start) File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\colorama\ansitowin32.py", line 195, in write_plain_text self.wrapped.write(text[start:end]) File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-6: character maps to

micahjohnson150 commented 4 years ago

Dangit. This is a moving target. This seems like a ANSI chars arent visible on your machine. I was able to get radicl working on my W10 at home (which I am away right now). So I don't understand why this is saying this. UGH. Back to the drawing board.

micahjohnson150 commented 4 years ago

@arothenbuhler could you post the results of pip freeze

could you also share some about the dev environment you are using?

arothenbuhler commented 4 years ago

$ pip freeze You are using pip version 9.0.1, however version 20.0.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. colorama==0.4.1 coloredlogs==10.0 cycler==0.10.0 humanfriendly==7.1.1 kiwisolver==1.1.0 matplotlib==3.0.2 numpy==1.18.1 pandas==0.23.4 pyparsing==2.4.6 pyreadline==2.1 pyserial==3.4 python-dateutil==2.8.1 pytz==2019.3 radicl==0.3.2 six==1.14.0 termcolor==1.1.0

I'm using python from the command line. I run it from git bash. When developing my own python applications I like to use PyCharm, because it's much nicer for debugging, but for radicl I'm running it straight from the command line.

micahjohnson150 commented 4 years ago

I wonder if git bash is preventing the ansi colors from being shown. I have been using powershell and getting it to work on my windows 10 machine.

  1. pip install pip --upgrade (theyre on version 20.2...)
  2. run radicl built from source through power shell in admin mode.
arothenbuhler commented 4 years ago

Haha, it works if I run it from the regular Windows command line. That's a bit odd though since python is supposed to be platform independent...

micahjohnson150 commented 4 years ago

Right but I think its more that git bash isn't written to handle everything and apparently that includes some ansi code chars. lol

arothenbuhler commented 4 years ago

Still having some issues. I can run radicl and it connects to the probe, but when I attempt to take an accelerometer reading, it crashes.

Traceback (most recent call last): File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\Scripts\radicl-script.py", line 11, in load_entry_point('radicl==0.3.2', 'console_scripts', 'radicl')() File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\radicl-0.3.2-py3.6.egg\radicl\cli.py", line 72, in main cli.run() File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\radicl-0.3.2-py3.6.egg\radicl\radicl.py", line 99, in run self.tasking() File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\radicl-0.3.2-py3.6.egg\radicl\radicl.py", line 116, in tasking fn() File "C:\Users\arothenbuhler\AppData\Local\Programs\Python\Python36\lib\site-packages\radicl-0.3.2-py3.6.egg\radicl\radicl.py", line 242, in task_daq self.take_a_reading() TypeError: take_a_reading() missing 1 required positional argument: 'data_request'