pydev: remote debug linux server from windows - pydev

I followed http://pydev.org/manual_adv_remote_debugger.html and configured something like this
PATHS_FROM_ECLIPSE_TO_PYTHON = [('W:',
r'/path/to/app'),
]
The translation works but has one little problem: the backslashes are not translated.
I am getting the following message:
pydev debugger: warning: trying to add breakpoint to file that does not exist:
/path/to/app\subpath\foo\bar.py (will have no effect)
How can I configure pydevd_file.utils.py so the backslashes get translated?

I found a solution.
I set
eclipse_sep = '\\'
python_sep = '/'
in pydevd_file_utils.py

Related

Configuring OpenDDS

I am trying to configure the environment for OpenDDS, but I could not run the configure script. Would really appreciate much, if there are any insight from you guys. =D
So basically, after I download the OpenDDS-3.12.zip from here. I have extracted to a folder and tried to run the configure file with this command in VS command prompt (VS2017)
configure --compiler=gcc
Next, the "ACE+TAO-2.2a_with_latest_patches_NO_makefiles" is downloaded and I extract the zip file to the root folder.
Then it shows this message.
ACE_ROOT/ace/config.h exists, skipping configuration of ACE+TAO
Use of uninitialized value $mpctype in string eq at configure line 1103.
Use of uninitialized value $mpctype in concatenation (.) or string at configure line 1257.
Use of uninitialized value $mpctype in string eq at configure line 1266.
Running MPC to generate project files.
MPC_ROOT was set to C:\src\OpenDDS-DDS-3.12.2\ACE_wrappers\MPC.
Using .../OpenDDS-DDS-
3.12.2/ACE_wrappers/bin/MakeProjectCreator/config/MPC.cfg
ERROR: Invalid type: C:\src\OpenDDS-DDS-3.12.2\DDS_TAOv2_all.mwc
mwc.pl v4.1.28
...
/*lots of explanation of each file here*
*then followed by*/
...
ERROR: Error from MPC, stopped at configure line 1270.
I have both Visual Studio 2017 and Perl 5.22 installed as well, I am not sure whether if this is a compiler issue or any other issue. The following is the configure script that printed the error above.
## line 1268 -- 1270 ##
if (!$opts{'dry-run'}) {
if (system("perl \"$ENV{'ACE_ROOT'}/bin/mwc.pl\" $mwcargs") != 0) {
die "ERROR: Error from MPC, stopped";
}
}
$mpctype is defined here:
my $mpctype = ($slash eq '/' ||
($cross_compile && $buildEnv->{'build'} eq 'target'))
? 'gnuace' : $opts{'compiler_version'};
It seems to be looking at $opts{'compiler_version'}, which is apparently empty. %opts is defined here:
my %opts = %{parseArgs()};
so it looks like you should define the compiler_version in the command line or define the target platform. It's probably better if you check out the INSTALL options thoroughly
VS2017 doesn't install c++ compiler by default.
Modify VS 2017 and select c++ compiler and install if VS 2017 already install.
configure (without --compiler=gcc flag)
I had a similar question. Being a newbie, I started with the getting started with java and windows on https://opendds.org/quickstart/GettingStartedWindows.html .
Step 5, "configure (To enable Java support, use configure --java)" didn't work in a visual studio command window despite
having set JAVA_HOME. I had sent ACE_ROOT, DDS_ROOT, TAO_ROOT and MPC_ROOT though the tutorial didn't specify based on trying to debug this problem.
When using the "--compiler" option I get errors similar to the ones in this thread. Was there any resolution just to get the"
"off-the-shelf" tutorial working. Using Windows 10.
D:\data\OpenDDS-3.13.3>configure --java --compiler="C:\Program Files\Java\jdk1.8.0_221\bin"
ACE_ROOT/ace/config.h exists, skipping configuration of ACE+TAO
Use of uninitialized value $mpctype in string eq at configure line 1482.
Use of uninitialized value $mpctype in concatenation (.) or string at configure line
1646.
Use of uninitialized value $mpctype in string eq at configure line 1655.
Running MPC to generate project files.
MPC_ROOT was set to D:\data\OpenDDS-3.13.3\ACE_WRAPPERS\MPC.
Using .../OpenDDS-3.13.3/ACE_WRAPPERS/bin/MakeProjectCreator/config/MPC.cfg
ERROR: Invalid type: D:\data\OpenDDS-3.13.3\DDS_TAOv2_all.mwc
mwc.pl v4.1.44
...
ERROR: Error from MPC, stopped at configure line 1659.

gcloud crashed (UnicodeEncodeError): 'ascii' codec can't encode character u'\xe7' in position 13: ordinal not in range(128)

Welcome to the Google Cloud SDK! Run "gcloud -h" to get the list of
available commands.
C:\Program Files (x86)\Google\Cloud SDK>gcloud init Welcome! This
command will take you through the configuration of gcloud.
Your current configuration has been set to: [default]
You can skip diagnostics next time by using the following flag:
gcloud init --skip-diagnostics
Network diagnostic detects and fixes local network connection issues.
Checking network connection...done. Reachability Check passed. Network
diagnostic (1/1 checks) passed.
ERROR: gcloud crashed (UnicodeEncodeError): 'ascii' codec can't encode
character u'\xe7' in position 13: ordinal not in range(128)
If you would like to report this issue, please run the following
command: gcloud feedback
To check gcloud for common problems, please run the following command:
gcloud info --run-diagnostics
I don't know what to do... I just want to use the sdk but I can't init it...
Have a look at the file which gave error , edit the .py file to add following lines
import sys
reload(sys)
sys.setdefaultencoding('utf8')
Try edit the code in google-cloud-sdk/lib/third_party/socks/__init__.py(google-cloud-sdk is the archive you downloaded to install google cloud sdk) in line 262:
req = req + struct.pack(">H", destport)
to
if isinstance(req, unicode):
req = req.encode('UTF-8')
req = req + struct.pack(">H", destport)
reference: https://c11e.wodemo.com/gcloud-crashed-unicodedecodeerror
For me the fix was removing an accent ('é') from a folder in the path of my project. Hope it can help someone since I didn't find this solution after googling it for hours.
I kept getting this similar error every time I ran a gcloud command after a crash:
ERROR: gcloud crashed (UnicodeDecodeError): 'utf8' codec can't decode byte 0xa4 in position 1: invalid start byte
The solution was to delete this file:
~/.config/gcloud/gce
Don't ask me why that works or what that files does, I don't know (if you do, please let me know), but it gets recreated on the next command run and it fixed my issue.
In my case, it was a special character in the folders of the current directory. After changing the current directory, it worked!
As you’ve noticed that the error is due to a non-ASCII character in the username. As a workaround, you can set the CLOUDSDK_CONFIG environment variable to a path that contains only ASCII characters.

capistrano upload! thinks ~ referenced local directory is on remote server

So every example I've looked up indicates this is how one is supposed to do it but I think I may have found a bug unless there's another way to do this.
I'm using upload! to upload assets to a remote list of servers. The task looks like this:
desc "Upload grunt compiled css/js."
task :upload_assets do
on roles(:all) do
%w{/htdocs/css /htdocs/js}.each do |asset|
upload! "#{fetch(:local_path) + asset}", "#{release_path.to_s + '/' + asset}", recursive: true
end
end
end
If local_path is defined as an absolute path such as:
set :local_path:, '/home/dcmbrown/projects/ABC'
This works fine. However if I do the following:
set :local_path:, '~/projects/ABC'
I end up getting the error:
The deploy has failed with an error: Exception while executing on ec2-54-23-88-125.us-west-2.compute.amazon.com: No such file or directory - ~/projects/ABC/htdocs/css
It's not a ' vs " issue as I've tried both (and I didn't think capistrano paid attention to that anyway).
Is this a bug? Is there a work around? Am I just doing it wrong?
I ended up discovering the best way to do this is to actually use path expansion! (headsmack)
irb> File.expand_path('~dcmbrown/projects/ABC')
=> "/home/dcmbrown/projects/ABC"
Of course what I'd like is to do automatic path expansion but you can't have everything. I think I was mostly dumbstruck that it didn't automatically; so much so I spent a couple of hours trying to figure out why it didn't work and ended up wasting time asking here. :(
I don't think the error is coming from the remote server, it just looks like it since it's running that upload command in the context of a deploy.
I just created a single cap task to just do an upload using the "~" character and it also fails with
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy#XXX: No such file or directory # rb_file_s_stat - ~/Projects/testapp/public/404.html
It appears to be a Ruby issue not Capistrano as this also fails in a Ruby console
~/Projects/testapp $ irb
2.2.2 :003 > File.stat('~/Projects/testapp/public/404.html')
Errno::ENOENT: No such file or directory # rb_file_s_stat - ~/Projects/testapp/public/404.html
from (irb):3:in `stat'
from (irb):3
from /Users/supairish/.rvm/rubies/ruby-2.2.2/bin/irb:11:in `<main>'

Algebra filter error in moodle

I installed moodle 1.9.12 and now I want to use Algebra notation in content. I enable "TeX Notation" and "Algebra Notation" in administrator panel and also install mimetext and dvips and Imagemagic on the server. fortunately Tex Notation works fine but I got the following error for Algebra:
sh: /var/www/html/moodle/filter/tex/mimetex.linux: not found
The shell command
"/var/www/html/moodle/filter/tex/mimetex.linux" -e "/var/www/moodledata/filter/algebra/de06d6c44d98ba4e42dffca988bf530b.gif" -- '\Large \frac{\sin\left(z\right)}{x^{2}+y^{2}}'
returned status = 127
File size of mimetex executable /var/www/html/moodle/filter/tex/mimetex.linux is 830675
The file permissions are: 100775
The md5 checksum of the file is 56bcc40de905ce92ebd7b083c76e019e
Image not found!
Note: /var/www/html/moodle/filter/tex/mimetex.linux exists on the server and is executable!!!
What is the problem?? Any idea?????
From what you have described, calling the general tex filter debug page works and does not show up the same error.
/filter/tex/texdebug.php works, but /filter/algebra/algebradebug.php does not.
If this is the case, perhaps you could check for an open_basedir, or safe_mode_exec_dir being set to include the current working directory, or otherwise restricting the execution of /var/www/html/moodle/filter/tex/mimetex.linux, while the current working directory is /var/www/html/moodle/filter/algebra.
You could look at this by visiting /admin/phpinfo.php at your site, and look carefully at the effective values of open_basedir, safe_mode and safe_mode_exec_dir.
You could also check the apache error log or add the following lines to the top of the algebra debug php file, and you might see some extra error messages:
$CFG->debug = 6143 ;
$CFG->debugdisplay= 1 ;
Hope that helps

wurfl2 integration in TYPO3

everytime i try to install the wurfl2 extension in TYPO3 i get the following error message:
Fatal error: require_once() [function.require]: Failed opening required '' (include_path='.:/usr/local/php/lib/php:/usr/local/php/lib/php/PEAR') in /html/typo3conf/temp_CACHED_ps9b8e_ext_localconf.php on line 501
is anyone familiar with this error and knows how to fix it?
I get the same error message with TYPO3 4.4.4. I had to remove the extension folder and to delete all ./typo3conf/temp* files to get Typo3 running again afterwards.
(You might not see the error message if you don't have something like $TYPO3_CONF_VARS['SYS']['displayErrors'] = '1' in your localconf.php. You can set this with the installtool.
As already mentioned by the other answer first you have to get your system running again: set $TYPO3_CONF_VARS['SYS']['displayErrors'] = '1' in your localconf.php in order to see all error messages. Afterwards remove the extension folder.
I think the error is caused by a missing config file. The extension constant wurflConfig has to be set with the absolute path to the file /YOUR/PATH/TO/WEB_DIR/typo3conf/ext/wurfl2/res1/li/wurfl_config.php and might have to adjust the settings there.