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

radicl crashes in Windows when started #5

Open
arothenbuhler opened this issue Feb 22, 2020 · 13 comments
Open

radicl crashes in Windows when started #5

arothenbuhler opened this issue Feb 22, 2020 · 13 comments
Assignees

Comments

@arothenbuhler
Copy link

  • radicl version: Latest. Can't get version using 'radicl --version'. It crashes..
  • Firmware version (if applicable): N/A
  • Python version: 3.6
  • Operating System: Windows 10

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
Copy link
Member

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
Copy link
Member

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
Copy link
Author

  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
Copy link
Member

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

@micahjohnson150
Copy link
Member

Could you post the result of
pip freeze

@micahjohnson150 micahjohnson150 self-assigned this Feb 22, 2020
@arothenbuhler
Copy link
Author

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
Copy link
Member

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
Copy link
Member

@arothenbuhler could you post the results of
pip freeze

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

@arothenbuhler
Copy link
Author

$ 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
Copy link
Member

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
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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'

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

2 participants