Problems while setting up the project on macOS Mavericks (10.14)


#1

Hi - I am new to openAg and am trying to setup the project software on my mac (it is the latest, current OS).

However, the install script doesn’t run out of the box; I try running the install scripts individually but there is a recurring problem with python3.6 & pip3.6 packages. iptables is not a supported package as far as I can figure out.

My question is this: Has anyone tried to work with a similar setup and run into issues? If anyone has set this up on a mac; please do reach out!

Thanks,
Utkarsh


#2

The OSX support is still a work in progress, sorry for the issues you found. I made a few changes and it now builds / runs on my mac running 10.14.3.


#3

Thanks for the revert @rbaynes. This’ll make my life simpler. I was getting into running an ubuntu/centos image on top of osx to get around this. Desperation?

Anyways, am about to start a new build diary, hopefully my first emulation of openag brain gets me up&running.
Thanks again!


#4

Great! Nice to have someone working on the bleeding edge with me. I am working on the drivers I need for a FT232H cable this week. The chip translates USB to I2C so we can talk to the hardware we build. I’m hoping there is a good python driver for it and I won’t have to resort to using FTDI’s C library.
https://www.digikey.com/products/en?keywords=768-1106-ND


#5

Sounds interesting, are you logging this somewhere? Plan on checking in later today/over the weekend.

I updated my build to pull the changes, however the requirements.sh is breaking (have attached the stack). Lmk if you get some time to go over it (might get tedious from the naive approaches I will use).stack.pdf (85.0 KB)


#6

My first guess would be that you are running python 3.7. I have only tested on Python 3.6.8.


#7

Yes, that’s correct. I am building this on py37. I have made the changes to get this up (namely hardcoded py & pip versions) - this line is giving me errors:
Creating postgres user…

ERROR: role “openag” already exists

ALTER ROLE

Creating database…

ERROR: database “openag_brain” already exists


#8

Fixed that, plus the python3.6 hardcoded mention in order to invoke manage.py. Currently working through the below stack:

24/Feb/2019 11:58:04.200] DEBUG app: Getting api root view
System check identified no issues (0 silenced).
Exception in thread Thread-1:
Traceback (most recent call last):
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
psycopg2.ProgrammingError: relation “app_sensorvariablemodel” does not exist
LINE 1: DELETE FROM “app_sensorvariablemodel”
^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py”, line 917, in _bootstrap_inner
self.run()
File “/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py”, line 865, in run
self._target(*self._args, **self._kwargs)
File “/Users/utkarshgupta/bountytech/openag-device-software/device/coordinator/manager.py”, line 204, in run
self.run_init_mode()
File “/Users/utkarshgupta/bountytech/openag-device-software/device/coordinator/manager.py”, line 231, in run_init_mode
self.load_local_data_files()
File “/Users/utkarshgupta/bountytech/openag-device-software/device/coordinator/manager.py”, line 446, in load_local_data_files
self.load_sensor_variables_file()
File “/Users/utkarshgupta/bountytech/openag-device-software/device/coordinator/manager.py”, line 480, in load_sensor_variables_file
models.SensorVariableModel.objects.all().delete()
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/models/query.py”, line 620, in delete
deleted, _rows_count = collector.delete()
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/models/deletion.py”, line 284, in delete
count = qs._raw_delete(using=self.using)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/models/query.py”, line 634, in _raw_delete
return sql.DeleteQuery(self.model).delete_qs(self, using)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/models/sql/subqueries.py”, line 80, in delete_qs
cursor = self.get_compiler(using).execute_sql(CURSOR)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/models/sql/compiler.py”, line 899, in execute_sql
raise original_exception
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/models/sql/compiler.py”, line 889, in execute_sql
cursor.execute(sql, params)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/backends/utils.py”, line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/utils.py”, line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/utils/six.py”, line 685, in reraise
raise value.with_traceback(tb)
File “/Users/utkarshgupta/bountytech/openag-device-software/venv/lib/python3.7/site-packages/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation “app_sensorvariablemodel” does not exist
LINE 1: DELETE FROM “app_sensorvariablemodel”


#9

I got this running, had to run manage.py migrate once.
Currently, the password for the brain is not working. Any clues on this?

Screenshot 2019-02-26 at 3.50.20 PM


#10

That is usually an issue with setting up the database. If you look at scripts/database there is one that populates postgresql with the default user and password. You can also use psql to look at the DB directly.

OSX support (as you have seen) is still a work in progress. Besides myself, you are only the second person to try to get it working. Sorry for the hassles.


#11

Hmm I know! I’m trying the defaults in the psql script (openag/openag) - maybe I need to get another db up, don’t want to explore stuff without getting it properly though.

Happy to help in any way reg. OSX dev by the way. I myself switched from a Dell with debian/windows to mac little over a year ago. So good for me to finally starting dev here.


#12

There is a database drop/delete script. Perhaps do that first, then look at the install.sh script and re-do the parts (in the same order) that create the DB, migrate it and add the users.