I just opened the Postgres App and clicked the "Open psql" button. But the psql command still returns that the role does not exist. I've also run ps aux | grep postgres and it looks like all the PID's that are associated with anything postgres are running under "MyProfile" (assuming I'm reading it right). Variations of sudo -u postgres createuser owning_userĪnd a couple other commands in an effort to create this roll/user, but I can't seem to get done what I need to to resolve the issue. Am I missing an obvious step here/doing something wrong? So far I've been following Heroku's instal process and am stuck here (or more accurately here, after the installation, where Heroku says that running psql -h localhost should work). When I run even just psql I, again, get the error FATAL: role "MyProfile" does not exist. I gather from the dozens of other questions on this topic that I need to switch to, or create the "M圜omputer" role, however I've noticed that they all require using the psql command. "name": processing_utils.create_tmp_copy_of_file(įile "D:\programs\Python310\lib\site-packages\gradio\processing_utils.py", line 323, in create_tmp_copy_of_fileįile "D:\programs\Python310\lib\shutil.py", line 434, in copy2Ĭopyfile(src, dst, follow_symlinks=follow_symlinks)įile "D:\programs\Python310\lib\shutil.I'm setting up Postgresql for use with a Rails app, but I do not seem to be able to connect to, or properly configure, the database (the errors I get after starting the Rails server are: ActiveRecord::NoDatabaseError and could not translate host name "MyProfile" to address: nodename nor servname provided, or not known). Predictions = self.postprocess_data(fn_index, result, state)įile "D:\programs\Python310\lib\site-packages\gradio\blocks.py", line 721, in postprocess_dataįile "D:\programs\Python310\lib\site-packages\gradio\components.py", line 2147, in postprocess Switches_ver.queue(concurrency_count=20, max_size=20).launch()įile "D:\programs\Python310\lib\site-packages\gradio\routes.py", line 273, in run_predictįile "D:\programs\Python310\lib\site-packages\gradio\blocks.py", line 757, in process_api Upgrade_ver.click(fn=block_ip, inputs = ips_to_block, outputs=) Show_ver.click(fn=switch_ver, inputs = switch_box, outputs = ) Output_textbox = gr.Textbox(label='Results',lines = 10) Upgrade_ver = gr.Button('Upgrade selected switches') Show_ver = gr.Button('Show current switches version') Switch_box = gr.Textbox(label = 'Switches', lines = 10, placeholder='Please fill switches IPs.') Output_textbox = gr.Textbox(label = "Results", lines=10)Ĭurrent_commit_stats = gr.Textbox(label = 'Current IP\s or URLs added to block:')įorti_ips_stats = gr.Textbox(label = 'Total blocked IP\s on Fortigate: ')įorti_urls_stats = gr.Textbox(label = 'Total URLs blocked on Fortigate')įorti_total_stats = gr.Textbox(label = 'Total blocked IP\s and URLs on Fortigate')īlock_btn.click(fn=block_ip, inputs = ips_to_block, outputs = ) Ips_to_block = gr.Textbox(label = "IPs", lines = 10, placeholder=('Please fill Ips to block')) With gr.Blocks(title = 'Switcher') as switches_ver: Return (blocked_ips_result), current_commit_stats, ips_stats, urls_stats, total_stats Return invalid_ips_result blocked_ips_result, current_commit_stats, ips_stats, urls_stats, total_stats Return invalid_ips_result duplicate_ips_result blocked_ips_result, current_commit_stats, ips_stats, urls_stats, total_statsĮlif bool(invalid_ips) = True and bool(blocked_ips) = True: Return duplicate_ips_result, current_commit_stats, ips_stats, urls_stats, total_statsĮlif bool(duplicate_ips) = True and bool(blocked_ips) = True and bool(invalid_ips) = True: If bool(duplicate_ips) = True and bool(blocked_ips) = False: With open('fortigate_ips.txt', 'r') as f, open('fortigate_urls.txt', 'r') as u: Invalid_ips_result = 'Skipped!.Invalid IP\s for \n' '\n'.join(invalid_ips) '\n' Os.chdir('D:\\programs\\Python310\\Projectsīlocked_ips_result = 'Following IP\s or URLs were Blocked!: \n' '\n'.join(blocked_ips) '\n'ĭuplicate_ips_result = 'Skipped!.Found duplicates IP\s for: \n' '\n'.join(duplicate_ips) '\n' Results = 'Switch version for #\n'.format(current_time) '\n'.join(blocked_ips)) '\n' With open('switches_successful_results.txt', 'a ') as sw: With open('switches_successful_results.txt','w') as switches_successful, open('switches_failed_results.txt', 'w') as switches_failed: #SETTING UP DATE AND TIME WITH ISRAELI FORMAT#Ĭurrent_month = current_date.strftime('%B')Ĭurrent_year = current_date.strftime('%Y')ĭate_reformat = current_date.strftime('%d/%m/%y')Ĭurrent_day = current_date.strftime('%d')
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |