workspace stringclasses 1
value | channel stringclasses 1
value | sentences stringlengths 1 3.93k | ts stringlengths 26 26 | user stringlengths 2 11 | sentence_id stringlengths 44 53 | timestamp float64 1.5B 1.56B | __index_level_0__ int64 0 106k |
|---|---|---|---|---|---|---|---|
pythondev | help | Hi guys , wanted to ask if any of you have ever called and used Python Scripts in R . rpy2 doesn't work on R 3.4 . Also please let me know if this is the wrong place for this question/ if there is a better place for it ? | 2017-10-15T12:53:38.000105 | Ronald | pythondev_help_Ronald_2017-10-15T12:53:38.000105 | 1,508,072,018.000105 | 96,903 |
pythondev | help | hello, this google api stt is some neat stuff but i am having trouble wrapping the example in some threading to keep it going. While a minute of speech to text is neat i would like to get hours of audio on a mic streamed to a text file or database. It seems like links are okay so ill paste the original here as it is from git...
<https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/speech/cloud-client/transcribe_streaming_mic.py>
To this i added a line and get some long term transcription to happen but eventually things bomb out or crash.
def main():
threading.Timer(35.0, main).start()
I believe i need to setup some services to run the mic to a stream and pass that to another thread that is keeping the google api connection open while another takes the response from google and writes to a text file/db.... So far getting everything together is beyond me and i am hopeful some folks have time/experience to help me piece something together. (thanks) | 2017-10-15T12:54:19.000078 | Shakita | pythondev_help_Shakita_2017-10-15T12:54:19.000078 | 1,508,072,059.000078 | 96,904 |
pythondev | help | <@Shakita> google’s API library is not thread safe, so you cannot use threads for your solution | 2017-10-15T13:01:37.000152 | Patty | pythondev_help_Patty_2017-10-15T13:01:37.000152 | 1,508,072,497.000152 | 96,905 |
pythondev | help | oh... didn't even think to check on that; and it prolly says in some red line on the top of everything i have been reading **not thread safe** | 2017-10-15T13:03:01.000033 | Shakita | pythondev_help_Shakita_2017-10-15T13:03:01.000033 | 1,508,072,581.000033 | 96,906 |
pythondev | help | thinking...
so i would like to keep the pyadio stream buffering and pass it to google api which will drop out every 30 to 60 seconds. I suppose i could have a loop that handles a graceful restart of the api connection... now instead of trying to do that inside a thread i just need to figure out that graceful restart while pulling in the mic buffer | 2017-10-15T13:08:50.000056 | Shakita | pythondev_help_Shakita_2017-10-15T13:08:50.000056 | 1,508,072,930.000056 | 96,907 |
pythondev | help | Hi guys. I am going to launch Github project on my local pc. But I have a trouble now.
When I execute "python manage.py runserver"
It shows like this.
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/Volumes/Work/Django/modern-fertility/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/Volumes/Work/Django/modern-fertility/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Volumes/Work/Django/modern-fertility/venv/lib/python2.7/site-packages/django/core/management/base.py", line 306, in run_from_argv
connections.close_all()
File "/Volumes/Work/Django/modern-fertility/venv/lib/python2.7/site-packages/django/db/utils.py", line 229, in close_all
for alias in self:
File "/Volumes/Work/Django/modern-fertility/venv/lib/python2.7/site-packages/django/db/utils.py", line 223, in __iter__
return iter(self.databases)
File "/Volumes/Work/Django/modern-fertility/venv/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/Volumes/Work/Django/modern-fertility/venv/lib/python2.7/site-packages/django/db/utils.py", line 156, in databases
self._databases = settings.DATABASES
File "/Volumes/Work/Django/modern-fertility/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__
self._setup(name)
File "/Volumes/Work/Django/modern-fertility/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/Volumes/Work/Django/modern-fertility/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 97, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Volumes/Work/Django/modern-fertility/fertility/settings.py", line 23, in <module>
SECRET_KEY = env('SECRET_KEY')
File "/Volumes/Work/Django/modern-fertility/venv/lib/python2.7/site-packages/environ/environ.py", line 127, in __call__
return self.get_value(var, cast=cast, default=default, parse_default=parse_default)
File "/Volumes/Work/Django/modern-fertility/venv/lib/python2.7/site-packages/environ/environ.py", line 269, in get_value
raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable | 2017-10-15T15:19:10.000097 | Charisse | pythondev_help_Charisse_2017-10-15T15:19:10.000097 | 1,508,080,750.000097 | 96,908 |
pythondev | help | Does anyone can help me? | 2017-10-15T15:19:54.000060 | Charisse | pythondev_help_Charisse_2017-10-15T15:19:54.000060 | 1,508,080,794.00006 | 96,909 |
pythondev | help | <https://docs.djangoproject.com/en/1.11/ref/settings/#secret-key> is missing from your settings | 2017-10-15T15:23:03.000061 | Meg | pythondev_help_Meg_2017-10-15T15:23:03.000061 | 1,508,080,983.000061 | 96,910 |
pythondev | help | or not available in your environment varialbes | 2017-10-15T15:23:17.000098 | Meg | pythondev_help_Meg_2017-10-15T15:23:17.000098 | 1,508,080,997.000098 | 96,911 |
pythondev | help | so, you’ll have to export it to an env var. what OS are you using? | 2017-10-15T15:23:33.000016 | Meg | pythondev_help_Meg_2017-10-15T15:23:33.000016 | 1,508,081,013.000016 | 96,912 |
pythondev | help | I am using MacOS 12.6 | 2017-10-15T15:26:30.000049 | Charisse | pythondev_help_Charisse_2017-10-15T15:26:30.000049 | 1,508,081,190.000049 | 96,913 |
pythondev | help | <@Meg> I think there is a problem in settings.py. loading env file part. | 2017-10-15T15:40:11.000081 | Charisse | pythondev_help_Charisse_2017-10-15T15:40:11.000081 | 1,508,082,011.000081 | 96,914 |
pythondev | help | what happens when you `echo $SECRET_KEY` | 2017-10-15T15:50:33.000032 | Meg | pythondev_help_Meg_2017-10-15T15:50:33.000032 | 1,508,082,633.000032 | 96,915 |
pythondev | help | it shows nothing. | 2017-10-15T15:56:30.000064 | Charisse | pythondev_help_Charisse_2017-10-15T15:56:30.000064 | 1,508,082,990.000064 | 96,916 |
pythondev | help | that’s your problem | 2017-10-15T15:56:39.000087 | Meg | pythondev_help_Meg_2017-10-15T15:56:39.000087 | 1,508,082,999.000087 | 96,917 |
pythondev | help | the settings is looking for that environment variable | 2017-10-15T15:57:02.000006 | Meg | pythondev_help_Meg_2017-10-15T15:57:02.000006 | 1,508,083,022.000006 | 96,918 |
pythondev | help | since it doesn’t exist, it throws that error | 2017-10-15T15:57:14.000008 | Meg | pythondev_help_Meg_2017-10-15T15:57:14.000008 | 1,508,083,034.000008 | 96,919 |
pythondev | help | its up to you to export the env var to your environment | 2017-10-15T15:57:24.000110 | Meg | pythondev_help_Meg_2017-10-15T15:57:24.000110 | 1,508,083,044.00011 | 96,920 |
pythondev | help | I can't understand, it used environ module on settings.py and used variables from .env file.
In the "Settings.py" file, it contains
import os
import environ
root = environ.Path(__file__) - 1 # three folder back (/a/b/c/ - 3 = /)
env = environ.Env(DEBUG=(bool, False),) # set default values and casting
environ.Env.read_env() # reading .env file | 2017-10-15T16:01:14.000037 | Charisse | pythondev_help_Charisse_2017-10-15T16:01:14.000037 | 1,508,083,274.000037 | 96,921 |
pythondev | help | please refer above screenshot | 2017-10-15T16:02:00.000068 | Charisse | pythondev_help_Charisse_2017-10-15T16:02:00.000068 | 1,508,083,320.000068 | 96,922 |
pythondev | help | gotcha | 2017-10-15T16:02:33.000150 | Meg | pythondev_help_Meg_2017-10-15T16:02:33.000150 | 1,508,083,353.00015 | 96,923 |
pythondev | help | I came across this same issue with using django-environ | 2017-10-15T16:02:44.000022 | Meg | pythondev_help_Meg_2017-10-15T16:02:44.000022 | 1,508,083,364.000022 | 96,924 |
pythondev | help | and ended up throwing that project out in favor of using a json env file locally and reading it from settings | 2017-10-15T16:03:04.000011 | Meg | pythondev_help_Meg_2017-10-15T16:03:04.000011 | 1,508,083,384.000011 | 96,925 |
pythondev | help | so how can I solve this? | 2017-10-15T16:03:57.000103 | Charisse | pythondev_help_Charisse_2017-10-15T16:03:57.000103 | 1,508,083,437.000103 | 96,926 |
pythondev | help | no clue. I just went with an adaptation of this ¯\_(ツ)_/¯ | 2017-10-15T16:04:17.000120 | Meg | pythondev_help_Meg_2017-10-15T16:04:17.000120 | 1,508,083,457.00012 | 96,927 |
pythondev | help | <https://github.com/twoscoops/two-scoops-of-django-1.8/blob/master/code/chapter_05_example_19.py> | 2017-10-15T16:04:18.000069 | Meg | pythondev_help_Meg_2017-10-15T16:04:18.000069 | 1,508,083,458.000069 | 96,928 |
pythondev | help | got rid of django-environ completely | 2017-10-15T16:04:29.000081 | Meg | pythondev_help_Meg_2017-10-15T16:04:29.000081 | 1,508,083,469.000081 | 96,929 |
pythondev | help | <@Patty> i think (based on logging outputting the thread info) that the example from google for python and the api is using threading. | 2017-10-15T16:56:24.000025 | Shakita | pythondev_help_Shakita_2017-10-15T16:56:24.000025 | 1,508,086,584.000025 | 96,930 |
pythondev | help | does anyone have experience wanting to run 2 event loops ~_~ | 2017-10-15T16:57:11.000016 | Jesusa | pythondev_help_Jesusa_2017-10-15T16:57:11.000016 | 1,508,086,631.000016 | 96,931 |
pythondev | help | well, I don't really want but yea... | 2017-10-15T16:57:22.000106 | Jesusa | pythondev_help_Jesusa_2017-10-15T16:57:22.000106 | 1,508,086,642.000106 | 96,932 |
pythondev | help | python-xlib has its own event loop | 2017-10-15T16:57:31.000002 | Jesusa | pythondev_help_Jesusa_2017-10-15T16:57:31.000002 | 1,508,086,651.000002 | 96,933 |
pythondev | help | but I want to run a bunch of other stuff in an asyncio loop | 2017-10-15T16:57:51.000027 | Jesusa | pythondev_help_Jesusa_2017-10-15T16:57:51.000027 | 1,508,086,671.000027 | 96,934 |
pythondev | help | it uses locks | 2017-10-15T17:01:57.000017 | Jesusa | pythondev_help_Jesusa_2017-10-15T17:01:57.000017 | 1,508,086,917.000017 | 96,935 |
pythondev | help | <https://github.com/python-xlib/python-xlib/blob/eb3f4b70671afa09cdd38b43d7cb5e38d92f63a7/Xlib/protocol/display.py#L157> | 2017-10-15T17:02:02.000092 | Jesusa | pythondev_help_Jesusa_2017-10-15T17:02:02.000092 | 1,508,086,922.000092 | 96,936 |
pythondev | help | with the blocking nature I think it makes sense that I need a thread | 2017-10-15T17:08:30.000004 | Jesusa | pythondev_help_Jesusa_2017-10-15T17:08:30.000004 | 1,508,087,310.000004 | 96,937 |
pythondev | help | <@Shakita> <https://developers.google.com/api-client-library/python/guide/thread_safety> | 2017-10-15T17:42:25.000065 | Patty | pythondev_help_Patty_2017-10-15T17:42:25.000065 | 1,508,089,345.000065 | 96,938 |
pythondev | help | i don't think i am using google-api-python-client which i believe that to be about | 2017-10-15T17:45:52.000033 | Shakita | pythondev_help_Shakita_2017-10-15T17:45:52.000033 | 1,508,089,552.000033 | 96,939 |
pythondev | help | but maybe everything i am using eventually goes back to that as it is python and the google api... | 2017-10-15T17:46:16.000005 | Shakita | pythondev_help_Shakita_2017-10-15T17:46:16.000005 | 1,508,089,576.000005 | 96,940 |
pythondev | help | <@Jesusa> I’ve seen two asycio event loops run in separate threads. If you’re not sharing data between them it’s even easier, but otherwise you may have to implement your own mutexes. I haven’t done it myself and only tried multiple event loops in node | 2017-10-15T17:46:56.000016 | Patty | pythondev_help_Patty_2017-10-15T17:46:56.000016 | 1,508,089,616.000016 | 96,941 |
pythondev | help | i think i am getting the looping to happen in an acceptable manner... had to add a check on time at the start of streaming to gcloud and then close if i was gt 45 seconds later. | 2017-10-15T17:47:31.000135 | Shakita | pythondev_help_Shakita_2017-10-15T17:47:31.000135 | 1,508,089,651.000135 | 96,942 |
pythondev | help | So then I’m assuming you’re using the google cloud client? | 2017-10-15T17:51:30.000056 | Patty | pythondev_help_Patty_2017-10-15T17:51:30.000056 | 1,508,089,890.000056 | 96,943 |
pythondev | help | It’s still not thread safe. They are working on moving the back end libraries to be thread safe | 2017-10-15T17:52:31.000012 | Patty | pythondev_help_Patty_2017-10-15T17:52:31.000012 | 1,508,089,951.000012 | 96,944 |
pythondev | help | yes google cloud client, alright thanks | 2017-10-15T18:01:08.000054 | Shakita | pythondev_help_Shakita_2017-10-15T18:01:08.000054 | 1,508,090,468.000054 | 96,945 |
pythondev | help | <@Patty> I've now packaged one of the loops in a thread, asyncio running in main | 2017-10-15T18:09:21.000054 | Jesusa | pythondev_help_Jesusa_2017-10-15T18:09:21.000054 | 1,508,090,961.000054 | 96,946 |
pythondev | help | on some event in the thread loop, it will send a task to the asyncio loop | 2017-10-15T18:10:08.000048 | Jesusa | pythondev_help_Jesusa_2017-10-15T18:10:08.000048 | 1,508,091,008.000048 | 96,947 |
pythondev | help | does that sound safe? | 2017-10-15T18:10:15.000057 | Jesusa | pythondev_help_Jesusa_2017-10-15T18:10:15.000057 | 1,508,091,015.000057 | 96,948 |
pythondev | help | `t = Thread(target=x_event, args=[lambda x: loop.create_task(async_test(x))])` | 2017-10-15T18:11:24.000069 | Jesusa | pythondev_help_Jesusa_2017-10-15T18:11:24.000069 | 1,508,091,084.000069 | 96,949 |
pythondev | help | I will make the auto brightness fully event driven :slightly_smiling_face: | 2017-10-15T18:12:23.000032 | Jesusa | pythondev_help_Jesusa_2017-10-15T18:12:23.000032 | 1,508,091,143.000032 | 96,950 |
pythondev | help | instead of requiring people to bind keys to my script, I am monitoring the brightness | 2017-10-15T18:12:55.000082 | Jesusa | pythondev_help_Jesusa_2017-10-15T18:12:55.000082 | 1,508,091,175.000082 | 96,951 |
pythondev | help | and if a user changed it, then it becomes a training sample | 2017-10-15T18:13:03.000102 | Jesusa | pythondev_help_Jesusa_2017-10-15T18:13:03.000102 | 1,508,091,183.000102 | 96,952 |
pythondev | help | x11 event loop, generic loop, inotify event loop | 2017-10-15T18:13:38.000030 | Jesusa | pythondev_help_Jesusa_2017-10-15T18:13:38.000030 | 1,508,091,218.00003 | 96,953 |
pythondev | help | ridiculous :smile: | 2017-10-15T18:13:42.000018 | Jesusa | pythondev_help_Jesusa_2017-10-15T18:13:42.000018 | 1,508,091,222.000018 | 96,954 |
pythondev | help | though inotify runs nicely with the other generic things | 2017-10-15T18:13:58.000036 | Jesusa | pythondev_help_Jesusa_2017-10-15T18:13:58.000036 | 1,508,091,238.000036 | 96,955 |
pythondev | help | though i'm not sure what the hit will be on performance given that there is threading | 2017-10-15T18:14:57.000093 | Jesusa | pythondev_help_Jesusa_2017-10-15T18:14:57.000093 | 1,508,091,297.000093 | 96,956 |
pythondev | help | Anyone know how to set a python environment on an offline server with no pip install. I can only transfer files and exeutables through a cloud storage . Is it a matter of using the tar.gz files for each package or can it be done using anaconda? | 2017-10-16T05:52:24.000283 | Ronald | pythondev_help_Ronald_2017-10-16T05:52:24.000283 | 1,508,133,144.000283 | 96,957 |
pythondev | help | pip can install local packages if you supply the path | 2017-10-16T05:55:27.000245 | Ciera | pythondev_help_Ciera_2017-10-16T05:55:27.000245 | 1,508,133,327.000245 | 96,958 |
pythondev | help | I'm not sure it's possible to package a whole environment easily | 2017-10-16T05:55:38.000486 | Ciera | pythondev_help_Ciera_2017-10-16T05:55:38.000486 | 1,508,133,338.000486 | 96,959 |
pythondev | help | <@Ronald> are you on linux? | 2017-10-16T05:56:45.000158 | Collette | pythondev_help_Collette_2017-10-16T05:56:45.000158 | 1,508,133,405.000158 | 96,960 |
pythondev | help | Windows | 2017-10-16T06:00:56.000053 | Ronald | pythondev_help_Ronald_2017-10-16T06:00:56.000053 | 1,508,133,656.000053 | 96,961 |
pythondev | help | <@Collette> on Windows | 2017-10-16T06:01:11.000110 | Ronald | pythondev_help_Ronald_2017-10-16T06:01:11.000110 | 1,508,133,671.00011 | 96,962 |
pythondev | help | Then yeah, download wheels for windows on another machine, copy them into your offline machine and do `pip install wheels/*` | 2017-10-16T06:01:51.000332 | Collette | pythondev_help_Collette_2017-10-16T06:01:51.000332 | 1,508,133,711.000332 | 96,963 |
pythondev | help | <@Collette> will try this out | 2017-10-16T06:02:19.000400 | Ronald | pythondev_help_Ronald_2017-10-16T06:02:19.000400 | 1,508,133,739.0004 | 96,964 |
pythondev | help | thank you :slightly_smiling_face: | 2017-10-16T06:02:22.000315 | Ronald | pythondev_help_Ronald_2017-10-16T06:02:22.000315 | 1,508,133,742.000315 | 96,965 |
pythondev | help | <@Ciera> Thanks as well | 2017-10-16T06:02:33.000148 | Ronald | pythondev_help_Ronald_2017-10-16T06:02:33.000148 | 1,508,133,753.000148 | 96,966 |
pythondev | help | I am trying to demonize celery but I am not able to. | 2017-10-16T06:06:38.000317 | Desire | pythondev_help_Desire_2017-10-16T06:06:38.000317 | 1,508,133,998.000317 | 96,967 |
pythondev | help | My logs show:
```supervisor: couldn't exec /root/.local/share/virtualenvs/api-n2K3qAV1/bin/celery: EACCES
supervisor: child process was not spawned``` | 2017-10-16T06:06:42.000145 | Desire | pythondev_help_Desire_2017-10-16T06:06:42.000145 | 1,508,134,002.000145 | 96,968 |
pythondev | help | i did follow this: <https://realpython.com/blog/python/asynchronous-tasks-with-django-and-celery/> | 2017-10-16T06:08:47.000182 | Desire | pythondev_help_Desire_2017-10-16T06:08:47.000182 | 1,508,134,127.000182 | 96,969 |
pythondev | help | looks like a permission issue | 2017-10-16T06:12:18.000341 | Meg | pythondev_help_Meg_2017-10-16T06:12:18.000341 | 1,508,134,338.000341 | 96,970 |
pythondev | help | is this on staging or local dev? | 2017-10-16T06:12:39.000231 | Meg | pythondev_help_Meg_2017-10-16T06:12:39.000231 | 1,508,134,359.000231 | 96,971 |
pythondev | help | its on staging. | 2017-10-16T06:13:03.000103 | Desire | pythondev_help_Desire_2017-10-16T06:13:03.000103 | 1,508,134,383.000103 | 96,972 |
pythondev | help | ok, because that `/root/` path to the virtualenv is really weird | 2017-10-16T06:13:49.000189 | Meg | pythondev_help_Meg_2017-10-16T06:13:49.000189 | 1,508,134,429.000189 | 96,973 |
pythondev | help | are you executing the daemon with `sudo`? | 2017-10-16T06:14:11.000205 | Meg | pythondev_help_Meg_2017-10-16T06:14:11.000205 | 1,508,134,451.000205 | 96,974 |
pythondev | help | ```
; ==================================
; celery worker supervisor
; ==================================
; the name of your supervisord program
[program:minancecelery]
; Set full path to celery program if using virtualenv
command=/root/.local/share/virtualenvs/api-n2K3qAV1/bin/celery worker -A Minance --loglevel=debug
; The directory to your Django project
directory=/home/minance/api/Minance/
; If supervisord is run as the root user, switch users to this UNIX user account
; before doing any processing.
user=minance
group=www-data
; Supervisor will start as many instances of this program as named by numprocs
numprocs=1
; Put process stdout output in this file
stdout_logfile=/var/log/celery/minance_worker.log
; Put process stderr output in this file
stderr_logfile=/var/log/celery/minance_worker.log
; If true, this program will start automatically when supervisord is started
autostart=true
; May be one of false, unexpected, or true. If false, the process will never
; be autorestarted. If unexpected, the process will be restart when the program
; exits with an exit code that is not one of the exit codes associated with this
; process’ configuration (see exitcodes). If true, the process will be
; unconditionally restarted when it exits, without regard to its exit code.
autorestart=true
; The total number of seconds which the program needs to stay running after
; a startup to consider the start successful.
startsecs=10
; Need to wait for currently executing tasks to finish at shutdown.
; Increase this if you have very long running tasks.
stopwaitsecs = 600
; When resorting to send SIGKILL to the program to terminate it
; send SIGKILL to its whole process group instead,
; taking care of its children as well.
killasgroup=true
; if your broker is supervised, set its priority higher
; so it starts first
priority=998``` | 2017-10-16T06:15:23.000327 | Desire | pythondev_help_Desire_2017-10-16T06:15:23.000327 | 1,508,134,523.000327 | 96,975 |
pythondev | help | ok, the whole issue is you have the virtualenv in the `/root` folder | 2017-10-16T06:15:58.000060 | Meg | pythondev_help_Meg_2017-10-16T06:15:58.000060 | 1,508,134,558.00006 | 96,976 |
pythondev | help | _bad_ | 2017-10-16T06:16:01.000206 | Meg | pythondev_help_Meg_2017-10-16T06:16:01.000206 | 1,508,134,561.000206 | 96,977 |
pythondev | help | so, it’s really locked down with permissions | 2017-10-16T06:16:53.000339 | Meg | pythondev_help_Meg_2017-10-16T06:16:53.000339 | 1,508,134,613.000339 | 96,978 |
pythondev | help | normally what I do is use the default user folder, install the virtualenv there in `/home/user_name/.virtualenv/project/....` | 2017-10-16T06:17:32.000046 | Meg | pythondev_help_Meg_2017-10-16T06:17:32.000046 | 1,508,134,652.000046 | 96,979 |
pythondev | help | and point to that instead | 2017-10-16T06:17:38.000203 | Meg | pythondev_help_Meg_2017-10-16T06:17:38.000203 | 1,508,134,658.000203 | 96,980 |
pythondev | help | I got you. | 2017-10-16T06:21:13.000149 | Desire | pythondev_help_Desire_2017-10-16T06:21:13.000149 | 1,508,134,873.000149 | 96,981 |
pythondev | help | so, the clue for that was `EACCESS` | 2017-10-16T06:22:42.000105 | Meg | pythondev_help_Meg_2017-10-16T06:22:42.000105 | 1,508,134,962.000105 | 96,982 |
pythondev | help | because that’s a kernel issue | 2017-10-16T06:22:48.000179 | Meg | pythondev_help_Meg_2017-10-16T06:22:48.000179 | 1,508,134,968.000179 | 96,983 |
pythondev | help | and says you have some permission issues | 2017-10-16T06:22:58.000377 | Meg | pythondev_help_Meg_2017-10-16T06:22:58.000377 | 1,508,134,978.000377 | 96,984 |
pythondev | help | then the path to the virtualenvs was the next big clue | 2017-10-16T06:23:09.000193 | Meg | pythondev_help_Meg_2017-10-16T06:23:09.000193 | 1,508,134,989.000193 | 96,985 |
pythondev | help | Looking for a suggestion for a good geocoding lib in python. Need to be able to convert addresses into IPs. Thinking about Google Maps APIs but wondering if worth using a standard python solution first. Geopy looked good until I realised it is now unmaintained. Anyone used anything else? | 2017-10-16T07:00:27.000134 | Vada | pythondev_help_Vada_2017-10-16T07:00:27.000134 | 1,508,137,227.000134 | 96,986 |
pythondev | help | Does anyone have any idea how I could accomplish logging of specific calls and stderr to the same filehandler where stdout are specific log-calls whereas stderr are generic script crashes? I can't get the errors to print to the file correctly... | 2017-10-16T10:35:16.000623 | Scot | pythondev_help_Scot_2017-10-16T10:35:16.000623 | 1,508,150,116.000623 | 96,987 |
pythondev | help | Why not use the `logging` module ? | 2017-10-16T10:36:00.000190 | Ciera | pythondev_help_Ciera_2017-10-16T10:36:00.000190 | 1,508,150,160.00019 | 96,988 |
pythondev | help | I am, it's driving me nuts that I can't configure it correctly | 2017-10-16T10:36:23.000504 | Scot | pythondev_help_Scot_2017-10-16T10:36:23.000504 | 1,508,150,183.000504 | 96,989 |
pythondev | help | can you share your config ? :slightly_smiling_face: | 2017-10-16T10:37:13.000369 | Ciera | pythondev_help_Ciera_2017-10-16T10:37:13.000369 | 1,508,150,233.000369 | 96,990 |
pythondev | help | To be honest, what I'm force to now is actually sending all logs to stdout as a downstream program captures the stdout, but I can't get the stderr to be picked up as well... | 2017-10-16T10:37:37.000209 | Scot | pythondev_help_Scot_2017-10-16T10:37:37.000209 | 1,508,150,257.000209 | 96,991 |
pythondev | help | ```
root_log = logging.getLogger('')
root_log.setLevel(<http://logging.INFO|logging.INFO>)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
fh = logging.FileHandler('stdout.log')
fh.setLevel(<http://logging.INFO|logging.INFO>)
fh.setFormatter(formatter)
root_log.addHandler(fh)
sh = logging.StreamHandler(sys.stdout)
sh.setLevel(<http://logging.INFO|logging.INFO>)
sh.setFormatter(formatter)
root_log.addHandler(sh)
``` | 2017-10-16T10:38:27.000146 | Scot | pythondev_help_Scot_2017-10-16T10:38:27.000146 | 1,508,150,307.000146 | 96,992 |
pythondev | help | tbh, the filehandler could be ignored | 2017-10-16T10:38:51.000245 | Scot | pythondev_help_Scot_2017-10-16T10:38:51.000245 | 1,508,150,331.000245 | 96,993 |
pythondev | help | I thought you wanted to log to a file ? | 2017-10-16T10:39:04.000323 | Ciera | pythondev_help_Ciera_2017-10-16T10:39:04.000323 | 1,508,150,344.000323 | 96,994 |
pythondev | help | As mentioned, a downstream program captures the stdout and writes to file, I was a bit unclear | 2017-10-16T10:39:27.000401 | Scot | pythondev_help_Scot_2017-10-16T10:39:27.000401 | 1,508,150,367.000401 | 96,995 |
pythondev | help | or do you need it to be read by a downstream program ? | 2017-10-16T10:39:28.000778 | Ciera | pythondev_help_Ciera_2017-10-16T10:39:28.000778 | 1,508,150,368.000778 | 96,996 |
pythondev | help | It's not by choice I should point out | 2017-10-16T10:39:50.000267 | Scot | pythondev_help_Scot_2017-10-16T10:39:50.000267 | 1,508,150,390.000267 | 96,997 |
pythondev | help | I'm sorry but just to be clear. Would logging everything directly to a file be ok ? | 2017-10-16T10:40:27.000198 | Ciera | pythondev_help_Ciera_2017-10-16T10:40:27.000198 | 1,508,150,427.000198 | 96,998 |
pythondev | help | It would not in this case | 2017-10-16T10:40:40.000305 | Scot | pythondev_help_Scot_2017-10-16T10:40:40.000305 | 1,508,150,440.000305 | 96,999 |
pythondev | help | ok | 2017-10-16T10:41:10.000582 | Ciera | pythondev_help_Ciera_2017-10-16T10:41:10.000582 | 1,508,150,470.000582 | 97,000 |
pythondev | help | I'm not sure you can redirect exception output to something else than stderr. You could either read from stdout and stderr in your downstream program or do a big `try` `Except` and `LOG.exception` | 2017-10-16T10:43:16.000297 | Ciera | pythondev_help_Ciera_2017-10-16T10:43:16.000297 | 1,508,150,596.000297 | 97,001 |
pythondev | help | I did look at redirecting stderr to stdout but it looked and felt wrong. The downstream program is unfortunately not something I can modify so i'm sort of stuck with this venture | 2017-10-16T10:44:34.000302 | Scot | pythondev_help_Scot_2017-10-16T10:44:34.000302 | 1,508,150,674.000302 | 97,002 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.